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-2140: Cleanup old view change logic #1357

Merged
merged 5 commits into from
Oct 3, 2019

Conversation

skhoroshavin
Copy link
Member

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

Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
@lgtm-com
Copy link

lgtm-com bot commented Oct 2, 2019

This pull request introduces 1 alert when merging e5ec4a4 into 974229a - view on LGTM.com

new alerts:

  • 1 for Unused import

plenum/server/node.py Outdated Show resolved Hide resolved
Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
@lgtm-com
Copy link

lgtm-com bot commented Oct 3, 2019

This pull request fixes 3 alerts when merging 0cd6903 into d24bdf2 - view on LGTM.com

fixed alerts:

  • 2 for Property in old-style class
  • 1 for Unused import

Sergey Khoroshavin added 2 commits October 3, 2019 13:31
Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
@lgtm-com
Copy link

lgtm-com bot commented Oct 3, 2019

This pull request introduces 3 alerts and fixes 5 when merging e12f3d6 into d24bdf2 - view on LGTM.com

new alerts:

  • 3 for Unused import

fixed alerts:

  • 4 for Property in old-style class
  • 1 for Unused import

Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
@lgtm-com
Copy link

lgtm-com bot commented Oct 3, 2019

This pull request fixes 9 alerts when merging 731dc2b into d24bdf2 - view on LGTM.com

fixed alerts:

  • 5 for Property in old-style class
  • 3 for Unused import
  • 1 for 'super' in old style class

@Toktar
Copy link
Contributor

Toktar commented Oct 3, 2019

@ashcherbakov Please, review it too.

# TODO: Check whether these still need to be called somewhere after view change:
# - self.provider.select_primaries()
# - self.provider.notify_view_change_complete()
# - self.instance_changes.remove_view(self.view_no)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is already called by new code in _process_new_view_accerted (BTW there is a typo there)

# self.previous_view_no = None
# self.previous_master_primary = None
# TODO: Check whether these still need to be called somewhere after view change:
# - self.provider.select_primaries()
Copy link
Contributor

Choose a reason for hiding this comment

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

As for self.provider.select_primaries() (which is actually Node's select_primaries):

  1. It's called from select_primaries_on_catchup_complete when audit ledger is empty. Not the case anymore?
  2. It calls _setup_for_non_master_after_view_change - looks like we may need it since it does some cleanup!
  3. It calls primary_selected which resets some scheduled actions - need to have a look at this!

@@ -64,33 +64,3 @@ def txnPoolNodeSet(txnPoolNodeSet, looper, sdk_pool_handle, sdk_wallet_steward,
node.monitor.isMasterDegraded = lambda: False

return txnPoolNodeSet


def test_new_node_accepts_chosen_primary(
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 really remove the test? The test case looks valid .

@ashcherbakov ashcherbakov merged commit 3a603e2 into hyperledger:master Oct 3, 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

3 participants