Skip to content

Commit 1967c69

Browse files
committed
fix
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
1 parent 6ee59c7 commit 1967c69

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/transaction/client.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ impl Client {
278278
range: impl Into<BoundRange>,
279279
batch_size: u32,
280280
) -> Result<Vec<crate::proto::kvrpcpb::LockInfo>> {
281+
use crate::request::TruncateKeyspace;
282+
281283
let range = range.into().encode_keyspace(self.keyspace, KeyMode::Txn);
282284
let req = new_scan_lock_request(range, safepoint, batch_size);
283285
let plan = crate::request::PlanBuilder::new(self.pd.clone(), self.keyspace, req)

tests/common/mod.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,11 @@ const REGION_SPLIT_TIME_LIMIT: Duration = Duration::from_secs(15);
2424

2525
// Delete all entries in TiKV to leave a clean space for following tests.
2626
pub async fn clear_tikv() {
27-
// DEFAULT_REGION_BACKOFF is not long enough for CI environment. So set a longer backoff.
28-
let backoff = tikv_client::Backoff::no_jitter_backoff(100, 30000, 20);
2927
let raw_client =
3028
RawClient::new_with_config(pd_addrs(), Config::default().with_default_keyspace())
3129
.await
3230
.unwrap();
33-
raw_client
34-
// .with_backoff(backoff.clone())
35-
.delete_range(..)
36-
.await
37-
.unwrap();
31+
raw_client.delete_range(..).await.unwrap();
3832

3933
let txn_client =
4034
TransactionClient::new_with_config(pd_addrs(), Config::default().with_default_keyspace())

0 commit comments

Comments
 (0)