mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-02 17:09:18 +00:00
Suppress cluster UUID logs in 6.8/7.x upgrade (#56835)
Today a 7.x node logs `cluster UUID set to [...]` on every cluster state update received from a 6.8 master, because 6.8 nodes are not able to commit the cluster UUID properly. We could try and deduplicate these logs somehow, but that would introduce a good deal of complexity. Instead, this commit suppresses these logs entirely when receiving cluster state updates from a 6.8 master.
This commit is contained in:
parent
54d3cc74ec
commit
a3e845cbad
@ -505,8 +505,13 @@ public class CoordinationState {
|
|||||||
metadataBuilder = Metadata.builder(lastAcceptedState.metadata());
|
metadataBuilder = Metadata.builder(lastAcceptedState.metadata());
|
||||||
}
|
}
|
||||||
metadataBuilder.clusterUUIDCommitted(true);
|
metadataBuilder.clusterUUIDCommitted(true);
|
||||||
|
|
||||||
|
if (lastAcceptedState.term() != ZEN1_BWC_TERM) {
|
||||||
|
// Zen1 masters never publish a committed cluster UUID so if we logged this it'd happen on on every update. Let's just
|
||||||
|
// not log it at all in a 6.8/7.x rolling upgrade.
|
||||||
logger.info("cluster UUID set to [{}]", lastAcceptedState.metadata().clusterUUID());
|
logger.info("cluster UUID set to [{}]", lastAcceptedState.metadata().clusterUUID());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (metadataBuilder != null) {
|
if (metadataBuilder != null) {
|
||||||
setLastAcceptedState(ClusterState.builder(lastAcceptedState).metadata(metadataBuilder).build());
|
setLastAcceptedState(ClusterState.builder(lastAcceptedState).metadata(metadataBuilder).build());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user