File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ pub use key::Key;
14
14
pub use kvpair:: KvPair ;
15
15
pub use value:: Value ;
16
16
17
- struct HexRepr < ' a > ( pub & ' a [ u8 ] ) ;
17
+ pub struct HexRepr < ' a > ( pub & ' a [ u8 ] ) ;
18
18
19
19
impl < ' a > fmt:: Display for HexRepr < ' a > {
20
20
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
Original file line number Diff line number Diff line change @@ -7,13 +7,15 @@ use std::sync::Arc;
7
7
use fail:: fail_point;
8
8
use log:: debug;
9
9
use log:: error;
10
+ use log:: info;
10
11
use log:: warn;
11
12
use tokio:: sync:: RwLock ;
12
13
use tokio:: time:: sleep;
13
14
14
15
use crate :: backoff:: Backoff ;
15
16
use crate :: backoff:: DEFAULT_REGION_BACKOFF ;
16
17
use crate :: backoff:: OPTIMISTIC_BACKOFF ;
18
+ use crate :: kv:: HexRepr ;
17
19
use crate :: pd:: PdClient ;
18
20
use crate :: proto:: kvrpcpb;
19
21
use crate :: proto:: kvrpcpb:: TxnInfo ;
@@ -378,7 +380,7 @@ impl LockResolver {
378
380
// 2.2 Txn Rollbacked -- rollback itself, rollback by others, GC tomb etc.
379
381
// 2.3 No lock -- pessimistic lock rollback, concurrence prewrite.
380
382
let req = new_check_txn_status_request (
381
- primary,
383
+ primary. clone ( ) ,
382
384
txn_id,
383
385
caller_start_ts,
384
386
current_ts,
@@ -414,6 +416,8 @@ impl LockResolver {
414
416
415
417
let current = pd_client. clone ( ) . get_timestamp ( ) . await ?;
416
418
status. check_ttl ( current) ;
419
+ info ! ( "check_txn_status: primary {}, status {:?}" , HexRepr ( & primary) , status) ;
420
+
417
421
let res = Arc :: new ( status) ;
418
422
if res. is_cacheable ( ) {
419
423
self . ctx . save_resolved ( txn_id, res. clone ( ) ) . await ;
You can’t perform that action at this time.
0 commit comments