titan icon indicating copy to clipboard operation
titan copied to clipboard

Use the metakey as the primary key when committing a transaction

Open shafreeck opened this issue 4 years ago • 0 comments

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.

  1. Use a small prefix of MetaKey like changing D to P(payload)
  2. Add the feature to specify the primary key when committing a transaction.

shafreeck avatar Jan 16 '20 08:01 shafreeck