-
Notifications
You must be signed in to change notification settings - Fork 25
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
Correct self repair notifier #487
Conversation
Trigger repair on the right P2P network change
|
||
def start_link(args \\ []) do | ||
GenServer.start_link(__MODULE__, args) | ||
end | ||
|
||
def init(_) do | ||
PubSub.register_to_node_update() | ||
{:ok, []} | ||
{:ok, %{notified: %{}}} |
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.
if there is process crash??, and in a situation where all nodes waiting for each other for node_update: message?
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.
This state is just to avoid multiple node_update message for a given node, to avoid multiple repair in a close time.
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.
If the process crashes, it will restart with an empty state, and wait another message of unavailability of the node
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.
LGTM
Trigger repair on the right P2P network change
Trigger repair on the right P2P network change
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #348
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
When an authorized node is considered as unauthorized or globally offline, this means a topology change occurred, hence the notifier will repair transaction shards but proposing transactions to new storage nodes.
By disconnecting an authorized node the notifier should replicate all the transactions this node was in charge of.
Logs are also added to help to visualize the events.
Checklist: