In-memory Engine: lock should not be deleted directly
SpadeA-Tang opened this issue · comments
Bug Report
For delete cmd of lock cf, the delete is performed directly on in-memory engine rather than write tombsone. This is considered that we always want to read the latest value of the lock cf. However, it volates the write atomicity of the in-memory engine and rocksdb.
The complete process for writing a write batch is as follows:
rocksdb:write_callback -> .. -> rocksdb:write to memtable and callback with seqno. -> in-memory engine: write_impl -> rocksdb:publish seqno.
We can see that only when the last step that rocksdb publish the seqno will the write be visible. So we cannot avoid to write tombstone in lock-cf to guarantee the write atomicity.
One of the abnormal caused by this issue is: #17018
/found customer
/remove-found customer