tikv/raft-engine

Key value tombstone is lost during rewrite

Open

#141 opened on Nov 8, 2021

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Rust (106 forks)auto 404
bughelp wanted

Repository metrics

Stars
 (632 stars)
PR merge metrics
 (PR metrics pending)

Description

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.

Contributor guide