rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

Add CF `mark` for `Lock` and `Rollback` records

Open sticnarf opened this issue 3 years ago • 5 comments

sticnarf avatar Sep 28 '22 08:09 sticnarf

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

sticnarf avatar Sep 28 '22 08:09 sticnarf

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

ekexium avatar Sep 29 '22 06:09 ekexium

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.

TonsnakeLin avatar Oct 19 '22 11:10 TonsnakeLin

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.

sticnarf avatar Oct 25 '22 11:10 sticnarf

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.

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.

cfzjywxk avatar Oct 25 '22 11:10 cfzjywxk