-
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-1863: Allow limiting maximum number of 3PC batches in flight #1163
Conversation
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 |
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 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.
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.
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: |
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 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: |
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 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).
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>
Signed-off-by: Sergey Khoroshavin sergey.khoroshavin@dsr-corporation.com