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-1955: don't send CatchupReq to disconnected and unresponsive nodes #1063

Merged
merged 8 commits into from
Jan 28, 2019

Conversation

Toktar
Copy link
Contributor

@Toktar Toktar commented Jan 25, 2019

TODO:
unit tests

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>
@@ -483,6 +489,8 @@ def _make_consistency_proof(self, ledger, end, catchup_till):
@measure_time(MetricsName.PROCESS_CATCHUP_REP_TIME)
def processCatchupRep(self, rep: CatchupRep, frm: str):
logger.info("{} received catchup reply from {}: {}".format(self, frm, rep))
if frm in self.wait_catchup_rep_from:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe will be better use recvdCatchupRepliesFrm. But in this case we will not check nodes which stopped to answer during catchup.

1. Stop the node Delta
2. Order 9 txns. In sending CatchupReq in a first round every
node [Alpha, Beta, Gamma] will receive request for 3 txns.
3. Delay CatchupRep messages on Alpha
Copy link
Contributor

Choose a reason for hiding this comment

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

CatchupReq ?

looper.run(checkNodesConnected([*rest_nodes[:-1], restarted_node]))

waitNodeDataEquality(looper, *[*rest_nodes[:-1], restarted_node], customTimeout=240)
assert len(logs_catchup_req) <= 1
Copy link
Contributor

Choose a reason for hiding this comment

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

But we calculated logs_catchup_req and logs_request_txns before we started the catch-up, didn't we? So, it will always be 0.

looper.run(checkNodesConnected(txnPoolNodeSet))

waitNodeDataEquality(looper, *txnPoolNodeSet, customTimeout=240)
assert len(logsAbout) == 1
Copy link
Contributor

Choose a reason for hiding this comment

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

But we calculated logsAbout before we started the catch-up, didn't we? So, it will always be 0.

assert len(logs_catchup_req) <= 1
assert len(logs_request_txns) <= 1

# Restart Delta and wait for successful catch up
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 this part is not needed

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>
@ashcherbakov ashcherbakov merged commit 6ca54fa into hyperledger:master Jan 28, 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