-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print logs when the cluster state changes to fail add cluster_fail_reason to CLUSTER INFO #1188
base: unstable
Are you sure you want to change the base?
Conversation
…changes This log allows us to easily distinguish between full coverage and minority partition when the cluster fails. Sometimes it is not easy to see the minority partition in a healthy shards (both primary and replicas). Signed-off-by: Binbin <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #1188 +/- ##
============================================
+ Coverage 70.47% 70.69% +0.21%
============================================
Files 114 114
Lines 61799 63109 +1310
============================================
+ Hits 43555 44616 +1061
- Misses 18244 18493 +249
|
Co-authored-by: Ping Xie <[email protected]> Signed-off-by: Binbin <[email protected]>
Signed-off-by: Binbin <[email protected]>
Signed-off-by: Binbin <[email protected]>
@@ -5986,6 +6023,7 @@ sds genClusterInfoString(void) { | |||
|
|||
info = sdscatprintf(info, | |||
"cluster_state:%s\r\n" | |||
"cluster_fail_reason:%s\r\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly would rather not add an info field. This is one of those things were if the cluster is down, you get more useful information from the other fields (cluster_slots_assigned and cluster_size) and I don't want to add yet another field to look at. It's also not necessarily one or the other, it could be both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yean, this does seem useless, @PingXie thoughts?
This log allows us to easily distinguish between full coverage and
minority partition when the cluster fails. Sometimes it is not easy
to see the minority partition in a healthy shards (both primary and
replicas).