-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement simple log truncation mechanism
This commit introduces a simple log truncation mechanism. It works the following way: The PartitionProcessorManager spawns a PersistedLogLsnWatchdog which periodically checks what is the latest persisted applied log lsn for all registered partition stores. The way this works is by reading the applied lsn and then triggering a memtable flush. In order to not overwhelm the I/O system, the watchdog triggers the flush one after another. The default interval is set to 60 minutes. Additionally, the watchdog only persists the applied lsn if its difference to the previously persisted applied lsn is above a configurable threshold (default: 1000). The Watchdog sends the latest persisted applied log lsn to the PartitionProcessorManager where this information is used to enrich the PartitionProcessorStatus. The PartitionProcessorStatus is periodically send to the ClusterController service when receiving a heartbeat. The ClusterController service periodically checks the latest persisted log lsns with the latest trim points of the existing logs. If the difference is above a threshold, it triggers the trimming of the log. The default interval for checking the difference is set to 60 minutes and the threshold is 1000 log entries. Additionally, this commit adds a a TrimLog handler to the ClusterCtrlSvc which allows to manually trim a given log to a given trim point. This endpoint is intended for internal usage only (as an escape hatch). This fixes #1502.
- Loading branch information
1 parent
16e2e4d
commit 5973193
Showing
28 changed files
with
1,139 additions
and
76 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.