forked from yugabyte/yugabyte-db
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Adding a DocDB compaction filter that garbage-collects key/value pairs in RocksDB that are not visible at a specified "history cut-off timestamp". We are using the `CompactionFilter` / `CompactionFilterFactory` framework available in RocksDB to run custom logic on compactions. `CompactionFilterFactory` allows us to parameterize a `DocDBCompactionFilter` with a history cutoff timestamp at compaction start time and not worry about its thread safety, because a new `CompactionFilter` is used for each compaction. Also adding extensive randomized tests for reading at old timestamps and verifying that the state of the DB is as expected. Currently the retention policy is simply to retain history for a fixed time interval, e.g. 60 seconds or 10 seconds. Future work: - We should start tracking the read point and make sure we don't collect history at timestamps that data is still being read at, but that is not part of this revision. - Only garbage-collecting old versions on "full" (or "major") compactions. We should be able to do the same on other types of compactions in the absence of cross-tablet transactions, but that requires separate tests and is thus left to a further revision. Test Plan: Jenkins Reviewers: kannan, akashnil Reviewed By: kannan, akashnil Subscribers: jenkins-bot, eng Differential Revision: https://phabricator.dev.yugabyte.com/D810
- Loading branch information
Showing
60 changed files
with
2,674 additions
and
610 deletions.
There are no files selected for viewing
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
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.