mirror of https://github.com/tikv/client-rust.git
Merge branch 'master' into cmds
This commit is contained in:
commit
0e7839be76
|
@ -110,7 +110,7 @@ pub use crate::request::RetryOptions;
|
|||
pub use crate::timestamp::{Timestamp, TimestampExt};
|
||||
#[doc(inline)]
|
||||
pub use crate::transaction::{
|
||||
Client as TransactionClient, Snapshot, Transaction, TransactionOptions,
|
||||
CheckLevel, Client as TransactionClient, Snapshot, Transaction, TransactionOptions,
|
||||
};
|
||||
#[doc(inline)]
|
||||
pub use config::Config;
|
||||
|
|
|
@ -54,6 +54,8 @@ macro_rules! retry {
|
|||
let stats = pd_stats($tag);
|
||||
let mut last_err = Ok(());
|
||||
for _ in 0..LEADER_CHANGE_RETRY {
|
||||
// use the block here to drop the guard of the read lock,
|
||||
// otherwise `reconnect` will try to acquire the write lock and results in a deadlock
|
||||
let res = {
|
||||
let $cluster = &$self.cluster.read().await.0;
|
||||
let res = $call.await;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
pub use client::Client;
|
||||
pub(crate) use lock::{resolve_locks, HasLocks};
|
||||
pub use snapshot::Snapshot;
|
||||
pub use transaction::{Transaction, TransactionOptions};
|
||||
pub use transaction::{CheckLevel, Transaction, TransactionOptions};
|
||||
|
||||
mod buffer;
|
||||
mod client;
|
||||
|
|
Loading…
Reference in New Issue