vinyl: do not log dump if index was dropped#10294
Merged
locker merged 2 commits intotarantool:masterfrom Jul 23, 2024
Merged
Conversation
Let's log the new value when an error injection is set in orer to ease debugging in tests. NO_DOC=logging NO_TEST=logging NO_CHANGELOG=logging
An index can be dropped while a memory dump is in progress. If the vinyl garbage collector happens to delete the index from the vylog by the time the memory dump completes, the dump will log an entry for a deleted index, resulting in an error next time we try to recover the vylog, like: ``` ER_INVALID_VYLOG_FILE: Invalid VYLOG file: Run 2 committed after deletion ``` or ``` ER_INVALID_VYLOG_FILE: Invalid VYLOG file: Deleted range 9 has run slices ``` We already fixed a similar issue with compaction in commit 29e2931 ("vinyl: fix race between compaction and gc of dropped LSM"). Let's fix this one in exactly the same way: discard the new run without logging it to the vylog on a memory dump completion if the index was dropped while the dump was in progress. Closes tarantool#10277 NO_DOC=bug fix
andreyaksenov
approved these changes
Jul 22, 2024
mkostoevr
approved these changes
Jul 22, 2024
Contributor
mkostoevr
left a comment
There was a problem hiding this comment.
LGTM.
The fact the engine marks the LSM as dropped on the index drop comes handy.
Member
Author
|
Cherry-picked to 2.11 and 3.1. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An index can be dropped while a memory dump is in progress. If the vinyl garbage collector happens to delete the index from the vylog by the time the memory dump completes, the dump will log an entry for a deleted index, resulting in an error next time we try to recover the vylog, like:
or
We already fixed a similar issue with compaction in commit 29e2931. Let's fix this one in exactly the same way: discard the new run without logging it to the vylog on a memory dump completion if the index was dropped while the dump was in progress.
Closes #10277