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

Key value tombstone is lost during rewrite #141

Open
tabokie opened this issue Nov 8, 2021 · 0 comments
Open

Key value tombstone is lost during rewrite #141

tabokie opened this issue Nov 8, 2021 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@tabokie
Copy link
Member

tabokie commented Nov 8, 2021

Bug Report

Description

During Append queue rewrite, key value pairs of targeted Raft groups are scanned out and rewritten to Rewrite queue. After that, data files in Append queue is deleted.

However, in this process, key value tombstones (delete key operation) can't be detected and rewritten. Suppose rewrite is triggered after a Put and before a later Delete, the old key value is stored in Rewrite queue, but the subsequent deletion marker is purged from Append queue. When the engine restarts, the old key value will re-surface.

Right now, TiKV doesn't use kv delete API, so this bug is of minor urgency.

@tabokie tabokie added bug Something isn't working help wanted Extra attention is needed labels Nov 8, 2021
tabokie added a commit that referenced this issue Nov 9, 2021
Overhaul unit tests for engine. Discover and fix several bugs:

- First rewrite entry could have larger index than first append entry, and causes panic
- Region tombstone in append queue is not applied to rewrite queue during recovery
- [NOT FIXED] State tombstone is lost during rewrite #141
- Rewrite queue log index could jump back, and causes panic
- [NOT FIXED] Recreated region is deleted after rewrite #142

Signed-off-by: tabokie <xy.tao@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant