-
Notifications
You must be signed in to change notification settings - Fork 366
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
Do not check freshness in a catchup. #1179
Conversation
@@ -754,4 +754,5 @@ def propose_view_change(self, suspicion=Suspicions.PRIMARY_DEGRADED): | |||
|
|||
def is_state_fresh_enough(self): | |||
threshold = self.config.ACCEPTABLE_FRESHNESS_INTERVALS_COUNT * self.config.STATE_FRESHNESS_UPDATE_INTERVAL | |||
return self.provider.state_freshness() < threshold | |||
return self.provider.state_freshness() < threshold or (not self.view_change_in_progress and |
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.
Should we require participating
mode only?
@@ -754,4 +754,5 @@ def propose_view_change(self, suspicion=Suspicions.PRIMARY_DEGRADED): | |||
|
|||
def is_state_fresh_enough(self): | |||
threshold = self.config.ACCEPTABLE_FRESHNESS_INTERVALS_COUNT * self.config.STATE_FRESHNESS_UPDATE_INTERVAL | |||
return self.provider.state_freshness() < threshold | |||
return self.provider.state_freshness() < threshold or (not self.view_change_in_progress and |
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 think the condition would be much more readable if write as follows:
if self.provider.state_freshness() < threshold:
return True
if not self.view_change_in_progress and self.provider.node_mode() != Mode.participating:
return True
return False
tconf, ): | ||
""" | ||
Check that InstanceChange with reason "State signatures are not updated for too long" | ||
are not sends in catchup without view change. |
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.
is not sent
lagging_node.start_catchup() | ||
looper.runFor(tconf.ACCEPTABLE_FRESHNESS_INTERVALS_COUNT * tconf.STATE_FRESHNESS_UPDATE_INTERVAL + 5) | ||
|
||
print(lagging_node.view_changer.instance_changes._cache) |
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.
Please remove the print
Signed-off-by: toktar renata.toktar@dsr-corporation.com