fix unknown region error metrics (#315)

Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>

Co-authored-by: disksing <i@disksing.com>
This commit is contained in:
Lei Zhao 2021-09-29 13:50:39 +08:00 committed by GitHub
parent ee5063fec3
commit 3b672526bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -1314,6 +1314,20 @@ func regionErrorToLabel(e *errorpb.Error) string {
return "stale_command"
} else if e.GetStoreNotMatch() != nil {
return "store_not_match"
} else if e.GetRaftEntryTooLarge() != nil {
return "raft_entry_too_large"
} else if e.GetMaxTimestampNotSynced() != nil {
return "max_timestamp_not_synced"
} else if e.GetReadIndexNotReady() != nil {
return "read_index_not_ready"
} else if e.GetProposalInMergingMode() != nil {
return "proposal_in_merging_mode"
} else if e.GetDataIsNotReady() != nil {
return "data_is_not_ready"
} else if e.GetRegionNotInitialized() != nil {
return "region_not_initialized"
} else if e.GetDiskFull() != nil {
return "disk_full"
}
return "unknown"
}