box.sequence: sequence_data recovery after reset#10940
Merged
locker merged 1 commit intotarantool:masterfrom Jan 30, 2025
Merged
box.sequence: sequence_data recovery after reset#10940locker merged 1 commit intotarantool:masterfrom
locker merged 1 commit intotarantool:masterfrom
Conversation
f2a67bd to
5a1e7a5
Compare
Serpentian
reviewed
Dec 18, 2024
locker
reviewed
Dec 20, 2024
lenkis
approved these changes
Dec 20, 2024
changelogs/unreleased/gh_9871_sequence_data_recovery_after_reset.md
Outdated
Show resolved
Hide resolved
5f190b5 to
529f167
Compare
Serpentian
reviewed
Jan 26, 2025
Contributor
Serpentian
left a comment
There was a problem hiding this comment.
Only nits are left from my side. I'm ok with the current patch, since it won't be easy to allow on_replace, when there's no old_tuple and there's no much sense in it.
changelogs/unreleased/gh_9871_sequence_data_recovery_after_reset.md
Outdated
Show resolved
Hide resolved
test/engine-luatest/gh_9871_sequence_restart_after_reset_test.lua
Outdated
Show resolved
Hide resolved
locker
reviewed
Jan 27, 2025
555c7ef to
0ba7f33
Compare
There are two sources of sequence state in tarantool: `_sequence_data` table and its light version used in `box/sequence.c` which is stored in a hashmap. The reason for this decision was lack of cross-engine transactions. The first is used in lua API, the second -- internally to process memtx index updates. Now lua `reset()` call is always replayed during the final recovery on one hand and we don't rely on the spaces (other than system ones) content during the initial recovery since the latest hasmap state is stored into the snapshot directly on the other hand. Fixes tarantool#9871 NO_DOC=bugfix
0ba7f33 to
01711be
Compare
locker
approved these changes
Jan 29, 2025
Serpentian
approved these changes
Jan 29, 2025
Member
|
Cherry-picked to 3.3, 3.2, 2.11. |
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.
There are two sources of sequence state in tarantool:
_sequence_datatable and it's light version used inbox/sequence.cwhich is stored in a hashmap. The reason for this decision was lack of cross-engine transactions. The first is used in lua API, the second -- internally to process memtx index updates. Now luareset()call always produce WAL entry and we don't rely on memtx tables content during the initial recovery since the latest hasmap state is stored into snapshot directly.Fixes #9871
NO_DOC=bugfix