Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Lok <[email protected]>
  • Loading branch information
andylokandy committed Dec 25, 2023
1 parent 6ee59c7 commit 1967c69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/transaction/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ impl Client {
range: impl Into<BoundRange>,
batch_size: u32,
) -> Result<Vec<crate::proto::kvrpcpb::LockInfo>> {
use crate::request::TruncateKeyspace;

let range = range.into().encode_keyspace(self.keyspace, KeyMode::Txn);
let req = new_scan_lock_request(range, safepoint, batch_size);
let plan = crate::request::PlanBuilder::new(self.pd.clone(), self.keyspace, req)
Expand Down
8 changes: 1 addition & 7 deletions tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,11 @@ const REGION_SPLIT_TIME_LIMIT: Duration = Duration::from_secs(15);

// Delete all entries in TiKV to leave a clean space for following tests.
pub async fn clear_tikv() {
// DEFAULT_REGION_BACKOFF is not long enough for CI environment. So set a longer backoff.
let backoff = tikv_client::Backoff::no_jitter_backoff(100, 30000, 20);
let raw_client =
RawClient::new_with_config(pd_addrs(), Config::default().with_default_keyspace())
.await
.unwrap();
raw_client
// .with_backoff(backoff.clone())
.delete_range(..)
.await
.unwrap();
raw_client.delete_range(..).await.unwrap();

let txn_client =
TransactionClient::new_with_config(pd_addrs(), Config::default().with_default_keyspace())
Expand Down

0 comments on commit 1967c69

Please sign in to comment.