Commit dd7930f 1 parent 563db30 commit dd7930f Copy full SHA for dd7930f
File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1446,7 +1446,8 @@ func regionErrorToLabel(e *errorpb.Error) string {
1446
1446
return "flashback_in_progress"
1447
1447
} else if e .GetFlashbackNotPrepared () != nil {
1448
1448
return "flashback_not_prepared"
1449
- } else if strings .HasPrefix (e .Message , "mismatch peer id" ) {
1449
+ } else if strings .Contains (e .Message , "mismatch peer id" ) {
1450
+ // the error message is like "[components/raftstore/src/store/util.rs:428]: mismatch peer id ? != ?"
1450
1451
// the `mismatch peer id` error does not has a specific error type, so we have to match the error message.
1451
1452
// TODO: add a specific error type for `mismatch peer id`.
1452
1453
return "mismatch_peer_id"
Original file line number Diff line number Diff line change @@ -899,7 +899,7 @@ func (s *testRegionRequestToThreeStoresSuite) TestReplicaReadFallbackToLeaderReg
899
899
// Return `mismatch peer id` when accesses the leader.
900
900
if addr == s .cluster .GetStore (s .storeIDs [0 ]).Address {
901
901
return & tikvrpc.Response {Resp : & kvrpcpb.GetResponse {RegionError : & errorpb.Error {
902
- Message : " mismatch peer id 1 != 2" ,
902
+ Message : `"[components/raftstore/src/store/util.rs:428]: mismatch peer id 1 != 2"` ,
903
903
}}}, nil
904
904
}
905
905
return & tikvrpc.Response {Resp : & kvrpcpb.GetResponse {RegionError : & errorpb.Error {
You can’t perform that action at this time.
0 commit comments