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-1836: add test of req drop when replica does not order. #1042

Merged
merged 2 commits into from
Dec 25, 2018

Conversation

sergey-shilov
Copy link
Contributor

Also added a new counter unordered_by_replicas_num for req_state
to check how many replicas have not yet ordered particular
request.

Signed-off-by: Sergey Shilov sergey.shilov@dsr-company.com

Also added a new counter unordered_by_replicas_num for req_state
to check how many replicas have not yet ordered particular
request.

Signed-off-by: Sergey Shilov <sergey.shilov@dsr-company.com>
@sovbot
Copy link
Contributor

sovbot commented Dec 24, 2018

Can one of the admins verify this patch?

@@ -81,6 +82,15 @@ def forwarded(self, req: Request) -> bool:
"""
return self[req.key].forwarded

def ordered_by_replica(self, request_key):
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 also needs to be called in the following cases:

  1. _clear_request_for_txn
  2. clear_requests_and_fix_last_ordered

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.

@@ -81,6 +82,15 @@ def forwarded(self, req: Request) -> bool:
"""
return self[req.key].forwarded

def ordered_by_replica(self, request_key):
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/extend tests for this new method

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.

@@ -81,6 +82,15 @@ def forwarded(self, req: Request) -> bool:
"""
return self[req.key].forwarded

def ordered_by_replica(self, request_key):
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we call this mark_as_ordered to be aligned with mark_as_executed and mark_as_forwarded?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a manipulation with a counter, so such renaming is not fully correct semantically.

Signed-off-by: Sergey Shilov <sergey.shilov@dsr-company.com>
@ashcherbakov ashcherbakov merged commit e0b11c0 into hyperledger:master Dec 25, 2018
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

3 participants