pt-galera-log-explainer: refactor conflict response

This commit is contained in:
Yoann La Cancellera
2024-01-26 12:25:45 +01:00
parent 97cc3ebb01
commit 3bdc4b95ba

View File

@@ -93,14 +93,15 @@ var ApplicativeMap = types.RegexMap{
return logCtx, func(logCtx types.LogCtx) string { return logCtx, func(logCtx types.LogCtx) string {
for _, localname := range logCtx.OwnNames { for _, localname := range logCtx.OwnNames {
vote, ok := latestConflict.VotePerNode[localname] if node != localname {
// don't print other nodes vote, their should be in their own column // don't print other nodes vote, their should be in their own column
// else it just takes too much place without adding much usability // else it just takes too much place without adding much usability
if node != localname || !ok {
continue continue
} }
return voteResponse(vote, *latestConflict) if vote, ok := latestConflict.VotePerNode[localname]; ok {
return voteResponse(vote, *latestConflict)
}
} }
return "" return ""