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-2263: Implement ViewChangeTriggerService and PrimaryConnectionMonitorService #1405

Merged
merged 39 commits into from
Dec 6, 2019

Conversation

skhoroshavin
Copy link
Member

No description provided.

Sergey Khoroshavin added 3 commits November 14, 2019 17:11
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>
@lgtm-com
Copy link

lgtm-com bot commented Nov 20, 2019

This pull request introduces 5 alerts and fixes 1 when merging 3c9b840 into dfd3b09 - view on LGTM.com

new alerts:

  • 5 for Unused import

fixed alerts:

  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Nov 20, 2019

This pull request introduces 5 alerts and fixes 1 when merging de5926b into ddf15c2 - view on LGTM.com

new alerts:

  • 5 for Unused import

fixed alerts:

  • 1 for Unused import

Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
# TODO: This is a kind of hack to make Node process NeedViewChange before replicas
# Possible solution to this (and some other hacks) would be adding separate node internal bus
# to which such messages are sent, processed, and then forwarded to replicas buses if needed
PreNeedViewChange = NamedTuple('PreNeedViewChange', [('view_no', int)])
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it better to rename NeedViewChange to StartViewChange and PreNeedViewChange to NeedViewChange?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure. Probably better solution would be renaming PreNeedViewChange to NodeNeedViewChange (instead of PreNeedViewChange) and either keeping NeedViewChange as is or renaming it to ReplicaNeedViewChange. However introducing separate Node internal bus, from which messages are forwarded to Replicas internal buses looks like a clearer (but not cheaper) option for me, since it would not require introducing separate message at all. Any thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I would prefer to avoid having multiple messages doing the same, so a separate bus is a better solution I think. But if two messages are kept for a while, then I would prefer not to use 'PreViewChange...' name.

plenum/server/consensus/instance_change_service.py Outdated Show resolved Hide resolved
from plenum.server.view_change.view_changer import ViewChanger, ViewChangerDataProvider
from storage.kv_store import KeyValueStorage


Copy link
Contributor

Choose a reason for hiding this comment

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

Why can't we just fully remove the class and move all the logic to ViewChangeTriggerService?
It looks like ViewChangeTriggerService needs to be responsible for

  • View change by freshness
  • Forced view changes
  • View Changes on primary disconnection
  • View Changes on master degradation

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree that it is much better be handled just by one service. Problem is that this logic is much more tangled with node code, so I decided to postpone it a bit until I resolve problems with main part - sending and handling InstanceChange messages themselves.

Sergey Khoroshavin added 2 commits November 22, 2019 17:49
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 Nov 22, 2019

This pull request introduces 5 alerts and fixes 1 when merging ad49e50 into cadb30d - view on LGTM.com

new alerts:

  • 5 for Unused import

fixed alerts:

  • 1 for Unused import

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

lgtm-com bot commented Nov 22, 2019

This pull request fixes 1 alert when merging 9c2212c into cadb30d - view on LGTM.com

fixed alerts:

  • 1 for Unused import

Sergey Khoroshavin added 2 commits November 22, 2019 19:47
Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
@skhoroshavin skhoroshavin changed the title [WIP] INDY-2263: Implement InstanceChangeService [WIP] INDY-2263: Implement ViewChangeTriggerService Nov 23, 2019
@lgtm-com
Copy link

lgtm-com bot commented Nov 23, 2019

This pull request introduces 1 alert and fixes 1 when merging 5ed6fcf into cadb30d - view on LGTM.com

new alerts:

  • 1 for __init__ method calls overridden method

fixed alerts:

  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Nov 25, 2019

This pull request introduces 1 alert and fixes 1 when merging 2c8071f into cadb30d - view on LGTM.com

new alerts:

  • 1 for __init__ method calls overridden method

fixed alerts:

  • 1 for Unused import

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

lgtm-com bot commented Nov 25, 2019

This pull request introduces 1 alert and fixes 1 when merging 33428be into cadb30d - view on LGTM.com

new alerts:

  • 1 for __init__ method calls overridden method

fixed alerts:

  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Nov 26, 2019

This pull request introduces 1 alert and fixes 1 when merging 689e790 into e652e80 - view on LGTM.com

new alerts:

  • 1 for __init__ method calls overridden method

fixed alerts:

  • 1 for Unused import

Sergey Khoroshavin added 2 commits November 26, 2019 19:39
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 Nov 29, 2019

This pull request introduces 1 alert and fixes 2 when merging 74630d6 into 2558cf9 - view on LGTM.com

new alerts:

  • 1 for __init__ method calls overridden method

fixed alerts:

  • 2 for Unused import

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

lgtm-com bot commented Nov 29, 2019

This pull request introduces 3 alerts and fixes 2 when merging eb8deea into 2558cf9 - view on LGTM.com

new alerts:

  • 1 for Unused local variable
  • 1 for Unused import
  • 1 for __init__ method calls overridden method

fixed alerts:

  • 2 for Unused import

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

lgtm-com bot commented Dec 2, 2019

This pull request introduces 1 alert and fixes 2 when merging 8099e28 into 2558cf9 - view on LGTM.com

new alerts:

  • 1 for __init__ method calls overridden method

fixed alerts:

  • 2 for Unused import

Sergey Khoroshavin added 4 commits December 3, 2019 12:55
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>
@lgtm-com
Copy link

lgtm-com bot commented Dec 3, 2019

This pull request introduces 1 alert and fixes 3 when merging 8ae470d into ece14e9 - view on LGTM.com

new alerts:

  • 1 for __init__ method calls overridden method

fixed alerts:

  • 3 for Unused import

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

lgtm-com bot commented Dec 3, 2019

This pull request introduces 1 alert and fixes 3 when merging c61176b into ece14e9 - view on LGTM.com

new alerts:

  • 1 for __init__ method calls overridden method

fixed alerts:

  • 3 for Unused import

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

lgtm-com bot commented Dec 4, 2019

This pull request introduces 1 alert and fixes 3 when merging bc0ada4 into 84375f8 - view on LGTM.com

new alerts:

  • 1 for __init__ method calls overridden method

fixed alerts:

  • 3 for Unused import

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

lgtm-com bot commented Dec 4, 2019

This pull request introduces 1 alert and fixes 3 when merging 6122c74 into 84375f8 - view on LGTM.com

new alerts:

  • 1 for __init__ method calls overridden method

fixed alerts:

  • 3 for Unused import

@skhoroshavin skhoroshavin changed the title [WIP] INDY-2263: Implement ViewChangeTriggerService INDY-2263: Implement ViewChangeTriggerService and PrimaryConnectionMonitorService Dec 4, 2019
Signed-off-by: Sergey Khoroshavin <sergey.khoroshavin@dsr-corporation.com>
@lgtm-com
Copy link

lgtm-com bot commented Dec 4, 2019

This pull request introduces 2 alerts and fixes 3 when merging 49c1bfc into 84375f8 - view on LGTM.com

new alerts:

  • 2 for __init__ method calls overridden method

fixed alerts:

  • 3 for Unused import

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

lgtm-com bot commented Dec 4, 2019

This pull request introduces 2 alerts and fixes 3 when merging ecbbf43 into 956cc45 - view on LGTM.com

new alerts:

  • 2 for __init__ method calls overridden method

fixed alerts:

  • 3 for Unused import

Sergey Khoroshavin added 2 commits December 5, 2019 14:54
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 Dec 5, 2019

This pull request introduces 2 alerts and fixes 3 when merging 7361b53 into 956cc45 - view on LGTM.com

new alerts:

  • 2 for __init__ method calls overridden method

fixed alerts:

  • 3 for Unused import

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

lgtm-com bot commented Dec 5, 2019

This pull request introduces 2 alerts and fixes 3 when merging 7834bd1 into 956cc45 - view on LGTM.com

new alerts:

  • 2 for __init__ method calls overridden method

fixed alerts:

  • 3 for Unused import

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

lgtm-com bot commented Dec 5, 2019

This pull request introduces 2 alerts and fixes 3 when merging 8a21460 into 956cc45 - view on LGTM.com

new alerts:

  • 2 for __init__ method calls overridden method

fixed alerts:

  • 3 for Unused import

@skhoroshavin skhoroshavin merged commit 0a94829 into hyperledger:master Dec 6, 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