Skip to content

Commit 87d5cbb

Browse files
authored
Merge pull request #266 from ekexium/raw-resolve-lock
Don't resolve lock in raw requests
2 parents e320efa + 2b0db78 commit 87d5cbb

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/raw/client.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use tikv_client_common::Error;
44

55
use crate::{
6-
backoff::{DEFAULT_REGION_BACKOFF, OPTIMISTIC_BACKOFF},
6+
backoff::DEFAULT_REGION_BACKOFF,
77
config::Config,
88
pd::PdRpcClient,
99
raw::lowering::*,
@@ -115,7 +115,6 @@ impl Client {
115115
let plan = crate::request::PlanBuilder::new(self.rpc.clone(), request)
116116
.single_region()
117117
.await?
118-
.resolve_lock(OPTIMISTIC_BACKOFF)
119118
.retry_region(DEFAULT_REGION_BACKOFF)
120119
.post_process_default()
121120
.plan();
@@ -146,7 +145,6 @@ impl Client {
146145
) -> Result<Vec<KvPair>> {
147146
let request = new_raw_batch_get_request(keys.into_iter().map(Into::into), self.cf.clone());
148147
let plan = crate::request::PlanBuilder::new(self.rpc.clone(), request)
149-
.resolve_lock(OPTIMISTIC_BACKOFF)
150148
.multi_region()
151149
.retry_region(DEFAULT_REGION_BACKOFF)
152150
.merge(Collect)
@@ -177,7 +175,6 @@ impl Client {
177175
let plan = crate::request::PlanBuilder::new(self.rpc.clone(), request)
178176
.single_region()
179177
.await?
180-
.resolve_lock(OPTIMISTIC_BACKOFF)
181178
.retry_region(DEFAULT_REGION_BACKOFF)
182179
.extract_error()
183180
.plan();
@@ -208,7 +205,6 @@ impl Client {
208205
) -> Result<()> {
209206
let request = new_raw_batch_put_request(pairs.into_iter().map(Into::into), self.cf.clone());
210207
let plan = crate::request::PlanBuilder::new(self.rpc.clone(), request)
211-
.resolve_lock(OPTIMISTIC_BACKOFF)
212208
.multi_region()
213209
.retry_region(DEFAULT_REGION_BACKOFF)
214210
.extract_error()
@@ -239,7 +235,6 @@ impl Client {
239235
let plan = crate::request::PlanBuilder::new(self.rpc.clone(), request)
240236
.single_region()
241237
.await?
242-
.resolve_lock(OPTIMISTIC_BACKOFF)
243238
.retry_region(DEFAULT_REGION_BACKOFF)
244239
.extract_error()
245240
.plan();
@@ -268,7 +263,6 @@ impl Client {
268263
let request =
269264
new_raw_batch_delete_request(keys.into_iter().map(Into::into), self.cf.clone());
270265
let plan = crate::request::PlanBuilder::new(self.rpc.clone(), request)
271-
.resolve_lock(OPTIMISTIC_BACKOFF)
272266
.multi_region()
273267
.retry_region(DEFAULT_REGION_BACKOFF)
274268
.extract_error()
@@ -295,7 +289,6 @@ impl Client {
295289
pub async fn delete_range(&self, range: impl Into<BoundRange>) -> Result<()> {
296290
let request = new_raw_delete_range_request(range.into(), self.cf.clone());
297291
let plan = crate::request::PlanBuilder::new(self.rpc.clone(), request)
298-
.resolve_lock(OPTIMISTIC_BACKOFF)
299292
.multi_region()
300293
.retry_region(DEFAULT_REGION_BACKOFF)
301294
.extract_error()
@@ -437,7 +430,6 @@ impl Client {
437430

438431
let request = new_raw_scan_request(range.into(), limit, key_only, self.cf.clone());
439432
let plan = crate::request::PlanBuilder::new(self.rpc.clone(), request)
440-
.resolve_lock(OPTIMISTIC_BACKOFF)
441433
.multi_region()
442434
.retry_region(DEFAULT_REGION_BACKOFF)
443435
.merge(Collect)
@@ -469,7 +461,6 @@ impl Client {
469461
self.cf.clone(),
470462
);
471463
let plan = crate::request::PlanBuilder::new(self.rpc.clone(), request)
472-
.resolve_lock(OPTIMISTIC_BACKOFF)
473464
.multi_region()
474465
.retry_region(DEFAULT_REGION_BACKOFF)
475466
.merge(Collect)

0 commit comments

Comments
 (0)