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 #844

Merged
merged 15 commits into from
Aug 1, 2018

Conversation

ashcherbakov
Copy link
Contributor

@ashcherbakov ashcherbakov commented Jul 30, 2018

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 ping/pongs received from 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>
@ashcherbakov ashcherbakov changed the title [WIP][skip ci][ci skip] INDY-1497: Fix sending to not connected remotes [WIP] INDY-1497: Fix sending to not connected remotes Jul 30, 2018
@ashcherbakov
Copy link
Contributor Author

test this please

Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
@ashcherbakov ashcherbakov changed the title [WIP] INDY-1497: Fix sending to not connected remotes INDY-1497: Fix sending to not connected remotes Jul 30, 2018
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>
sergey-shilov
sergey-shilov previously approved these changes Jul 31, 2018
Signed-off-by: ashcherbakov <alexander.sherbakov@dsr-company.com>
sergey-shilov
sergey-shilov previously approved these changes Aug 1, 2018
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 d3b5f5e into master Aug 1, 2018
@ashcherbakov ashcherbakov deleted the fix/send-to-not-connected branch August 3, 2018 09:11
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