Skip to content
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

Merged
merged 36 commits into from
Jan 11, 2019

Conversation

Toktar
Copy link
Contributor

@Toktar Toktar commented Dec 28, 2018

ashcherbakov and others added 18 commits December 13, 2018 15:57
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>
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>
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 "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: self.logger.

Copy link
Contributor Author

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__)
Copy link
Contributor

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

Copy link
Contributor Author

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(
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

ashcherbakov and others added 11 commits December 29, 2018 10:43
[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>
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>
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,
Copy link
Contributor

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?

Copy link
Contributor Author

@Toktar Toktar Jan 11, 2019

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.

Copy link
Contributor Author

@Toktar Toktar Jan 11, 2019

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.

Copy link
Contributor

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

@ashcherbakov ashcherbakov merged commit a8bc46b into hyperledger:master Jan 11, 2019
@ashcherbakov ashcherbakov changed the title [WIP][INDY-1876] Integration ReplicaStasher and ReplicaValidator [INDY-1876] Integration ReplicaStasher and ReplicaValidator Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants