Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
Signed-off-by: Ping Yu <[email protected]>
  • Loading branch information
pingyu committed Mar 22, 2024
1 parent 1c2acb5 commit dffaaa0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/request/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,15 +577,15 @@ where
return Ok(result);
}

if self.backoff.is_none() {
if clone.backoff.is_none() {
return Err(Error::ResolveLockError(locks));
}

let pd_client = self.pd_client.clone();
let pd_client = clone.pd_client.clone();
let live_locks =
resolve_locks(locks, self.timestamp.clone(), pd_client.clone()).await?;
resolve_locks(locks, clone.timestamp.clone(), pd_client.clone()).await?;
if live_locks.is_empty() {
result = self.inner.execute().await?;
result = clone.inner.execute().await?;
} else {
match clone.backoff.next_delay_duration() {
None => return Err(Error::ResolveLockError(live_locks)),
Expand Down
2 changes: 1 addition & 1 deletion src/transaction/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub async fn resolve_locks(
.insert(cleaned_region);
}
}
info!("resolved locks, live_locks: {:?}", live_locks);
info!("resolved_locks, live_locks: {:?}", live_locks);
Ok(live_locks)
}

Expand Down

0 comments on commit dffaaa0

Please sign in to comment.