Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correctly generate sequences when the value is pre-existed #3502

Merged

Conversation

MichaelScofield
Copy link
Collaborator

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

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Mar 13, 2024
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 94.44444% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 84.94%. Comparing base (904484b) to head (b57ffb5).
Report is 1 commits behind head on main.

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     

@killme2008 killme2008 mentioned this pull request Mar 14, 2024
4 tasks
Copy link
Contributor

@evenyag evenyag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fengjiachun fengjiachun added this pull request to the merge queue Mar 14, 2024
Merged via the queue into GreptimeTeam:main with commit e3c8256 Mar 14, 2024
17 checks passed
@MichaelScofield MichaelScofield deleted the fix/sequence-with-exist-value branch March 18, 2024 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants