titan
titan copied to clipboard
Use the metakey as the primary key when committing a transaction
The 2PC in TiKV uses the percolator distributed transaction model which commits the secondary keys in the background. When the secondary keys are MetaKey
s which is lazily updated in async may kick off the new request accessing this object because of the lock. So we should use the MetaKey
as the primary key.
There are two ways to gain this goal.
- Use a small prefix of
MetaKey
like changingD
toP
(payload) - Add the feature to specify the primary key when committing a transaction.