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-1329: Removal of previous stashed checkpoints #704

Merged
merged 51 commits into from
May 28, 2018

Conversation

spivachuk
Copy link
Contributor

@spivachuk spivachuk commented May 24, 2018

  • Added removal of previous stashed received checkpoints on own checkpoint stabilization. Enhanced test_second_checkpoint_after_catchup_can_be_stabilized to verify this logic.
  • Simplified code for removal of stashed checkpoints.
  • Rolled back the recent changes in garbage collection since they had turned out to be not completely correct.

- Added removal of previous stashed received checkpoints on own checkpoint stabilization.
- Rolled back the recent changes in the garbage collection.

Signed-off-by: Nikita Spivachuk <nikita.spivachuk@dsr-company.com>
Signed-off-by: Nikita Spivachuk <nikita.spivachuk@dsr-company.com>
@@ -2429,7 +2430,8 @@ def caught_up_till_3pc(self, last_caught_up_3PC):
self._remove_till_caught_up_3pc(last_caught_up_3PC)
self._remove_ordered_from_queue(last_caught_up_3PC)
self.checkpoints.clear()
self._remove_current_view_stashed_checkpoints(last_caught_up_3PC)
if last_caught_up_3PC[0] == self.viewNo:
Copy link
Contributor

Choose a reason for hiding this comment

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

What if haven'e yet ordered anything in this view and last_ordered points to the previous view?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This means that no stashed received checkpoints from this view must be removed. So we will not get into this if branch.

Signed-off-by: Nikita Spivachuk <nikita.spivachuk@dsr-company.com>
Signed-off-by: Nikita Spivachuk <nikita.spivachuk@dsr-company.com>
Signed-off-by: Nikita Spivachuk <nikita.spivachuk@dsr-company.com>
@ashcherbakov ashcherbakov merged commit 93beb26 into hyperledger:master May 28, 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

2 participants