-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assume fast tombstone is true and fix bug in VersionMapImpl::follow_v…
…ersion_chain (#366) Resolves #174 **Changes** * Remove all branches involving fast tombstone property assuming it's always true. * Fix a bug in follow version chain functionality. **Bug description** Up to now the code assumes that there are no active versions after a tombstone_all key and stops following the version chain after encountering a `tombstone_all` key type. This is not true when we use `prune_previous_versions`. Imagine the following calls: 1. Add version 0 for a symbol `sym` 2. Add version 1 for the symbol `sym` 3. Prune previous versions This would result in the following version chain: 0. `(key_type: tombstone_all, version_id: 0)` 1. `(key_type: version, version_id: 0)` 2. `(key_type: index, version_id: 1)` 3. `(key_type: version, version_id: 1)` 5. `(key_type: index, version_id 0)` Where we have a live version (version 1) after the `tombstone_all` key. The bug does not appear when using `write + prune` because in that case we first add the `tombstone_all` key and after that we write the new version. **Solution** In case there is `tombstone_all` key, in `VersionMapImpl::follow_version_chain` we need to keep track of the oldest index which was read and stop reading only if `tombstone_all_->version_id()` is greater or equal to the `version_id` of the oldest index. --------- Co-authored-by: Vasil Pashov <Vasil.Pashov@man.com>
- Loading branch information
1 parent
69412a8
commit d454f0e
Showing
7 changed files
with
56 additions
and
109 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
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