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

refactor(meta): Ensure all moving values remain unchanged between two transactions #3727

Merged
merged 12 commits into from
Apr 18, 2024

Conversation

WenyXu
Copy link
Member

@WenyXu WenyXu commented Apr 17, 2024

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

  1. Introduce move_values in TombstoneManager
  2. Ensure all moving values remain unchanged between two transactions
  3. Make delete_table_metadata and restore_table_metadata to be Idempotent.

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 Apr 17, 2024
@WenyXu WenyXu requested a review from fengjiachun April 17, 2024 07:23
Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

What is the purpose of this refactor?

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

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

Project coverage is 85.15%. Comparing base (d123791) to head (684dce1).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3727      +/-   ##
==========================================
- Coverage   85.44%   85.15%   -0.29%     
==========================================
  Files         966      966              
  Lines      162087   162094       +7     
==========================================
- Hits       138496   138034     -462     
- Misses      23591    24060     +469     

@WenyXu
Copy link
Member Author

WenyXu commented Apr 17, 2024

What is the purpose of this refactor?

For moving value to tombstone values operation, it ensures all values remain unchanged between two transactions instead of a single value in the previous version.

src/common/meta/src/key.rs Outdated Show resolved Hide resolved
src/common/meta/src/key/tombstone.rs Outdated Show resolved Hide resolved
src/common/meta/src/key/tombstone.rs Outdated Show resolved Hide resolved
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

@tisonkun tisonkun changed the title refactor: refactor tombstone manager refactor(meta): Ensure all moving values remain unchanged between two transactions Apr 17, 2024
@MichaelScofield MichaelScofield added this pull request to the merge queue Apr 18, 2024
Merged via the queue into GreptimeTeam:main with commit 2a2a448 Apr 18, 2024
19 checks passed
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