diff --git a/src/transaction/client.rs b/src/transaction/client.rs index 96718cab..eb9cc91b 100644 --- a/src/transaction/client.rs +++ b/src/transaction/client.rs @@ -278,6 +278,8 @@ impl Client { range: impl Into, batch_size: u32, ) -> Result> { + 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) diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 497d2493..d22a4cb1 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -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())