Only refute if the incarnation is greater than or equal to our own
This prevents us from doing unnecessary refutation, and also prevents
us from potentially lowering our incarnation in the face of an older
rumor.
@@ -692,14 +692,14 @@ impl Server {
let rk: RumorKey = RumorKey::from(&member);
if member.id == self.member_id() {
if health != Health::Alive {
- self.member
- .write()
- .expect("Member lock is poisoned")
- .refute_incarnation(member.incarnation);
+ let mut me = self.member.write().expect("Member lock is poisoned");
+ if member.incarnation >= me.incarnation() {
+ me.refute_incarnation(member.incarnation);
health = Health::Alive;
incremented_incarnation = true;
}
}
+ }
// NOTE: This sucks so much right here. Check out how we allocate no matter what, because
// of just how the logic goes. The value of the trace is really high, though, so we suck it
// for now.
