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-1497: Fix sending to not connected remotes #849

Merged

Conversation

sergey-shilov
Copy link
Contributor

Problem reason:

  • If a message is sent to a node which hasn't yet replied with pong (that is connected), then there is a chance that the message will be lost and not re-sent. This may lead to losing messages, especially during initial catch-up.

Fix:

  • Stash messages sent to disconnected node and re-send them once we got both ping and pong from them (that is both nodes are being connected and known to each other).
  • The queue for stashing is limited to avoid out of memory issues.
  • Stash and re-send pongs to not yet connected entities.

Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
… remotes

Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
…h with ping/pongs

Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
@ashcherbakov ashcherbakov merged commit f4d8a6e into hyperledger:master Aug 1, 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