mirror of https://github.com/tikv/client-rust.git
opt: Rollback early returns if no mutations
Signed-off-by: ekexium <ekexium@gmail.com>
This commit is contained in:
parent
c3d26733aa
commit
79f6259aa8
|
@ -507,6 +507,8 @@ impl TwoPhaseCommitter {
|
|||
if self.for_update_ts > 0 {
|
||||
new_pessimistic_rollback_request(keys, self.start_version, self.for_update_ts)
|
||||
.execute(self.rpc.clone(), OPTIMISTIC_BACKOFF)
|
||||
} else if self.mutations.is_empty() {
|
||||
Box::pin(future::ready(Ok(())))
|
||||
} else {
|
||||
new_batch_rollback_request(keys, self.start_version)
|
||||
.execute(self.rpc.clone(), OPTIMISTIC_BACKOFF)
|
||||
|
|
Loading…
Reference in New Issue