storage: fix wrong write size of resolve lock
@@ -780,7 +780,6 @@ fn process_write_impl<S: Snapshot, L: LockManager>(
let mut txn = MvccTxn::new(snapshot, TimeStamp::zero(), !cmd.ctx.get_not_fill_cache());
let mut scan_key = scan_key.take();
- let mut write_size = 0;
let rows = key_locks.len();
// Map txn's start_ts to ReleasedLocks
let mut released_locks = HashMap::default();
@@ -805,8 +804,7 @@ fn process_write_impl<S: Snapshot, L: LockManager>(
.or_insert_with(|| ReleasedLocks::new(current_lock.ts, commit_ts))
.push(released);
- write_size += txn.write_size();
- if write_size >= MAX_TXN_WRITE_SIZE {
+ if txn.write_size() >= MAX_TXN_WRITE_SIZE {
scan_key = Some(current_key);
break;
}
