Ignore gossip desrialization failures (#29848)
* Ignore gossip desrialization failures Only to happen suring a rolling upgrade. Gives us the option to do incompatible things in Gossip and have the old nodes ignore the deserialization error. * Review feedback
This commit is contained in:
parent
ffb21da246
commit
3602ffa4d9
1 changed files with 9 additions and 3 deletions
|
|
@ -324,7 +324,7 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef, joinConfigCompatCh
|
||||||
|
|
||||||
val selfDc = cluster.selfDataCenter
|
val selfDc = cluster.selfDataCenter
|
||||||
|
|
||||||
private val gossipLogger =
|
private val gossipLogger: cluster.ClusterLogger =
|
||||||
new cluster.ClusterLogger(
|
new cluster.ClusterLogger(
|
||||||
Logging.withMarker(context.system, ActorWithLogClass(this, ClusterLogClass.ClusterGossip)))
|
Logging.withMarker(context.system, ActorWithLogClass(this, ClusterLogClass.ClusterGossip)))
|
||||||
|
|
||||||
|
|
@ -1015,9 +1015,15 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef, joinConfigCompatCh
|
||||||
* Receive new gossip.
|
* Receive new gossip.
|
||||||
*/
|
*/
|
||||||
def receiveGossip(envelope: GossipEnvelope): ReceiveGossipType = {
|
def receiveGossip(envelope: GossipEnvelope): ReceiveGossipType = {
|
||||||
|
|
||||||
val from = envelope.from
|
val from = envelope.from
|
||||||
val remoteGossip = envelope.gossip
|
val remoteGossip = try {
|
||||||
|
envelope.gossip
|
||||||
|
} catch {
|
||||||
|
case NonFatal(t) =>
|
||||||
|
gossipLogger.logWarning("Invalid Gossip. This should only happen during a rolling upgrade. {}", t.getMessage)
|
||||||
|
Gossip.empty
|
||||||
|
|
||||||
|
}
|
||||||
val localGossip = latestGossip
|
val localGossip = latestGossip
|
||||||
|
|
||||||
if (remoteGossip eq Gossip.empty) {
|
if (remoteGossip eq Gossip.empty) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue