The 2PC in TiKV uses the percolator distributed transaction model which commits the secondary keys in the background. When the secondary keys are MetaKeys 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 changing D to P(payload)
- Add the feature to specify 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
MetaKeys which is lazily updated in async may kick off the new request accessing this object because of the lock. So we should use theMetaKeyas the primary key.There are two ways to gain this goal.
MetaKeylike changingDtoP(payload)