fix: correctly generate sequences when the value is pre-existed#3502
Merged
fengjiachun merged 1 commit intoGreptimeTeam:mainfrom Mar 14, 2024
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3502 +/- ##
==========================================
- Coverage 85.31% 84.94% -0.38%
==========================================
Files 903 903
Lines 149704 149782 +78
==========================================
- Hits 127727 127231 -496
- Misses 21977 22551 +574 |
tisonkun
approved these changes
Mar 14, 2024
12 tasks
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.
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
Sometimes the value in the kvbackend that is used to store the sequence could be pre-existed, even before the sequence has been built. If the value is smaller than the set initial of sequence, the sequence will start from the (smaller) value, which violates the intuition that sequence must start from initial. This PR fixes that.
Checklist