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

Disable the slot compaction while the cluster slot is migrating #2079

Open
1 of 2 tasks
git-hulk opened this issue Jan 31, 2024 · 0 comments
Open
1 of 2 tasks

Disable the slot compaction while the cluster slot is migrating #2079

git-hulk opened this issue Jan 31, 2024 · 0 comments
Labels
enhancement type enhancement

Comments

@git-hulk
Copy link
Member

Search before asking

  • I had searched in the issues and found no similar issues.

Motivation

Currently, we allow to run compaction even though the slot is migrating,
so it may cause data inconsistent in the corner case like below:

  1. The cluster migration was started at T1 with the snapshot
  2. The key 'foo' expired at T2, but it's extended between T1 and T2 to T3
  3. Then the slot starts migrating the key 'foo' after T2, then it will be skipped since it's expired
  4. Finally, the extended time write batch will be applied by iterating WAL items, but it will miss the subkeys since all of them are skipped.

This issue was found by @caipengbo, just record to prevent forgetting.

Solution

Don't compact the slot if it's migrating, and also migrate them if it's expired.

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@git-hulk git-hulk added the enhancement type enhancement label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement type enhancement
Projects
None yet
Development

No branches or pull requests

1 participant