-
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
[INDY-1876] Integration ReplicaStasher and ReplicaValidator #1046
[INDY-1876] Integration ReplicaStasher and ReplicaValidator #1046
Conversation
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-corporation.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-corporation.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-corporation.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-corporation.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
…plenum into task-1876-ordering-in-catchup
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
TODO: Fix fixtures in replica tests Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
…nto task-1876-ordering-in-catchup
plenum/server/replica.py
Outdated
def on_catch_up_finished(self, last_caught_up_3PC=None): | ||
if self.isMaster: | ||
if last_caught_up_3PC is None: | ||
self.looger.info("{} - on_catch_up_finished needs " |
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.
typo: self.logger
.
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.
Fixed.
@@ -50,13 +50,13 @@ def test_non_primary_recvs_3phase_message_outside_watermarks( | |||
slowNode.nodeIbStasher.delay(chk_delay(300)) | |||
|
|||
initialDomainLedgerSize = slowNode.domainLedger.size | |||
oldStashCount = slowReplica.spylog.count(TestReplica.stashOutsideWatermarks.__name__) |
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 it's better to check for slowReplica.stasher.num_stashed_watermarks
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.
Done.
@@ -43,8 +43,9 @@ def testNodeDiscardMessageFromUnknownView(txnPoolNodeSet, | |||
# 3 pc msg (PrePrepare) needs to be discarded | |||
_, did = sdk_wallet_client | |||
primaryRepl = getPrimaryReplica(txnPoolNodeSet) | |||
inst_id = 0 | |||
three_pc = PrePrepare( |
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.
Can we use a helper method create_pre_prepare
for creation of PrePrepare?
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.
Changed.
[WIP][INDY-1876] Integration ReplicaStasher and ReplicaValidator
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-corporation.com>
TODO: Fix fixtures in replica tests Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-corporation.com>
…plenum into task-1876-ordering-in-catchup
…plenum into task-1876-ordering-in-catchup
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
…ktar/indy-plenum into task-1876-ordering-in-catchup
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
…nto task-1876-ordering-in-catchup
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
extra={'cli': True}) | ||
self.mode = Mode.synced | ||
|
||
need_up_and_clear = compare_3PC_keys(self.master_last_ordered_3PC, |
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.
Why can't we do this check inside on_catch_up_finished
?
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.
Because if we check it inside then firstly updated master replica and backups can't updated backups after, master_last_ordered_3PC will already be changed.
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.
We can revert replicas list for this "for" but it looks like an unobvious way.
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.
well, but we can just pass master_last_ordered_3PC
then
Clone: ashcherbakov#1