mirror of https://github.com/tikv/client-go.git
txnkv: fix delete temp table issue request to kv-server (#281)
Signed-off-by: lysu <sulifx@gmail.com>
This commit is contained in:
parent
9d2ad5209e
commit
0c8381cbc2
|
|
@ -410,8 +410,8 @@ func (c *twoPhaseCommitter) initKeysAndMutations() error {
|
|||
lockCnt++
|
||||
} else {
|
||||
value = it.Value()
|
||||
if len(value) > 0 {
|
||||
isUnnecessaryKV := filter != nil && filter.IsUnnecessaryKeyValue(key, value, flags)
|
||||
if len(value) > 0 {
|
||||
if isUnnecessaryKV {
|
||||
if !flags.HasLocked() {
|
||||
continue
|
||||
|
|
@ -429,6 +429,9 @@ func (c *twoPhaseCommitter) initKeysAndMutations() error {
|
|||
putCnt++
|
||||
}
|
||||
} else {
|
||||
if isUnnecessaryKV {
|
||||
continue
|
||||
}
|
||||
if !txn.IsPessimistic() && flags.HasPresumeKeyNotExists() {
|
||||
// delete-your-writes keys in optimistic txn need check not exists in prewrite-phase
|
||||
// due to `Op_CheckNotExists` doesn't prewrite lock, so mark those keys should not be used in commit-phase.
|
||||
|
|
|
|||
Loading…
Reference in New Issue