Skip to content

Commit

Permalink
metrics: add bucket version not match metrics (tikv#957)
Browse files Browse the repository at this point in the history
  • Loading branch information
bufferflies authored Aug 30, 2023
1 parent a8860a9 commit 5c9fcf3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/locate/region_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -1922,6 +1922,8 @@ func regionErrorToLabel(e *errorpb.Error) string {
return "deadline_exceeded"
} else if e.GetMismatchPeerId() != nil {
return "mismatch_peer_id"
} else if e.GetBucketVersionNotMatch() != nil {
return "bucket_version_not_match"
}
return "unknown"
}
Expand Down Expand Up @@ -2079,7 +2081,8 @@ func (s *RegionRequestSender) onRegionError(
if bucketVersionNotMatch := regionErr.GetBucketVersionNotMatch(); bucketVersionNotMatch != nil {
logutil.Logger(bo.GetCtx()).Debug(
"tikv reports `BucketVersionNotMatch` retry later",
zap.Stringer("bucketVersionNotMatch", bucketVersionNotMatch),
zap.Uint64("latest bucket version", bucketVersionNotMatch.GetVersion()),
zap.Uint64("request bucket version", ctx.BucketVersion),
zap.Stringer("ctx", ctx),
)
// bucket version is not match, we should split this cop request again.
Expand Down

0 comments on commit 5c9fcf3

Please sign in to comment.