File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ failure = "0.1"
26
26
27
27
[dependencies .kvproto ]
28
28
git = " https://github.com/pingcap/kvproto.git"
29
+ rev = " f9b9e7d362c7cc2c90202fc7c300b2e466cbfbf2"
29
30
30
31
[dependencies .prometheus ]
31
32
version = " 0.4.2"
Original file line number Diff line number Diff line change @@ -46,14 +46,14 @@ impl From<errorpb::Error> for Error {
46
46
} else if e. has_region_not_found ( ) {
47
47
Error :: region_not_found ( e. get_region_not_found ( ) . get_region_id ( ) , Some ( message) )
48
48
} else if e. has_key_not_in_region ( ) {
49
- Error :: key_not_in_region ( e. take_key_not_in_region ( ) )
50
- } else if e. has_stale_epoch ( ) {
51
- let message = format ! (
49
+ let mut e = e. take_key_not_in_region ( ) ;
50
+ Error :: key_not_in_region ( e)
51
+ } else if e. has_epoch_not_match ( ) {
52
+ Error :: stale_epoch ( Some ( format ! (
52
53
"{}. New epoch: {:?}" ,
53
54
message,
54
- e. get_stale_epoch( ) . get_new_regions( )
55
- ) ;
56
- Error :: stale_epoch ( Some ( message) )
55
+ e. get_epoch_not_match( ) . get_current_regions( )
56
+ ) ) )
57
57
} else if e. has_server_is_busy ( ) {
58
58
Error :: server_is_busy ( e. take_server_is_busy ( ) )
59
59
} else if e. has_stale_command ( ) {
You can’t perform that action at this time.
0 commit comments