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-1863: Allow limiting maximum number of 3PC batches in flight #1163

Merged
merged 6 commits into from
Apr 15, 2019

Conversation

skhoroshavin
Copy link
Member

Signed-off-by: Sergey Khoroshavin sergey.khoroshavin@dsr-corporation.com

Sergey Khoroshavin added 2 commits April 12, 2019 19:23
Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
# Send a number of requests
reqs = sdk_send_random_requests(looper, sdk_pool_handle, sdk_wallet_client, BATCHES_TO_ORDER)

# Continuously check number of batches in flight
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't have more deterministic test, for example delay COMMITs, and make sure that the number of created PrePrepares is not more than MAX_BATCHES_IN_FLIGHT? Then start processing delayed commits one by one.

Copy link
Member Author

Choose a reason for hiding this comment

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

Great idea, thanks!

if self.replica.viewNo == self.replica.last_ordered_3pc[0]:
if self.replica.lastPrePrepareSeqNo < self.replica.last_ordered_3pc[1]:
return False
if self.replica.config.Max3PCBatchesInFlight is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add unit tests to test_replica_3pc_validation.py

if self.replica.viewNo == self.replica.last_ordered_3pc[0]:
if self.replica.lastPrePrepareSeqNo < self.replica.last_ordered_3pc[1]:
return False
if self.replica.config.Max3PCBatchesInFlight is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a comment why this check is inside self.replica.viewNo == self.replica.last_ordered_3pc[0] (as I understand, this is to avoid issues after view change to send enough batches when we have ppSeqNo=1).

Sergey Khoroshavin added 4 commits April 15, 2019 13:41
Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
@ashcherbakov ashcherbakov merged commit 5e09c26 into hyperledger:master Apr 15, 2019
@skhoroshavin skhoroshavin deleted the indy-1863 branch April 15, 2019 14:48
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