Add CF `mark` for `Lock` and `Rollback` records
I think @ekexium has an extensive analysis about different solutions to the problem. This is what I think the most practical one weighing the benefit and the cost.
Are you happy to share the desensitized document and the comparison sheet? @ekexium
Are you happy to share the desensitized document and the comparison sheet? @ekexium
Here you go! ~~https://docs.google.com/document/d/1cg_pAVPnAvOz9CwMihDkregvyN-jl20nSSr75NuU0Is/edit#~~ https://github.com/tikv/sig-transaction/pull/111
It brings a little extra jobs when committing the transaction such as writing two column families, deleting old Lock record. We should do the performance test for small oltp transactions which need to be committed as quickly as possible.
The reset LGTM.
To completely solve the issue, it is a must to overwrite the latest Lock or Rollback. Otherwise, the tombstones in the memtable can greatly slow down reading.
However, reusing the key of the latest Lock is too tricky. It is a huge question mark whether it is worth doing this way.
To completely solve the issue, it is a must to overwrite the latest
LockorRollback. Otherwise, the tombstones in the memtable can greatly slow down reading.However, reusing the key of the latest
Lockis too tricky. It is a huge question mark whether it is worth doing this way.
It's quite risky to overwrite the existing key, maybe other workarounds are needed to avoid the worst case with too much tombstone next in the memory table.