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"
2626
2727[dependencies .kvproto ]
2828git = " https://github.com/pingcap/kvproto.git"
29+ rev = " f9b9e7d362c7cc2c90202fc7c300b2e466cbfbf2"
2930
3031[dependencies .prometheus ]
3132version = " 0.4.2"
Original file line number Diff line number Diff line change @@ -46,14 +46,14 @@ impl From<errorpb::Error> for Error {
4646 } else if e. has_region_not_found ( ) {
4747 Error :: region_not_found ( e. get_region_not_found ( ) . get_region_id ( ) , Some ( message) )
4848 } 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 ! (
5253 "{}. New epoch: {:?}" ,
5354 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+ ) ) )
5757 } else if e. has_server_is_busy ( ) {
5858 Error :: server_is_busy ( e. take_server_is_busy ( ) )
5959 } else if e. has_stale_command ( ) {
You can’t perform that action at this time.
0 commit comments