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

Upon fail-over reconnection - mark last historical message in some special way. #813

Closed
matiwinnetou opened this issue Apr 5, 2023 · 3 comments · Fixed by #817
Closed
Assignees
Labels
💭 idea An idea or feature request
Milestone

Comments

@matiwinnetou
Copy link
Contributor

After reconnecting, client has some state and last seq number that it processed. After reconnection the client first skips all messages prior to the one it had already seen and then starts processing new messages.

The problem is that there could be significant amount of messages to be processed after our last message (because we were long offline). Ideally we would like last historical message to be specially marked.

Why?

Imagine we don't get this, we have to do workarounds:
1/ start interacting with the head while historical messages are being processed
2/ wait x amount of seconds minutes before we start interacting with the head again, e.g. no new messages are being pipped

I do understand this can be problematic to implement but I still wanted to flag this as implementing this on the client is not fun either.

Option 1:

  • will result in likely issues as the assumed head state maybe in a different de facto state

Option 2:

  • now we have to do some time heuristics and if the head is online with other participants advancing the state the best option we have is heuristics to check how far away messages are from current timestamp. Relaying on timestamps is brittle since the server and the client may have different local times...
@matiwinnetou matiwinnetou added the bug 🐛 Something isn't working label Apr 5, 2023
@ch1bo
Copy link
Collaborator

ch1bo commented Apr 6, 2023

@matiwinnetou There is a special Greetings message. Right now it is part of the history, so you would see it multiple times when you reconnect multiple times. But if we only send Greetings once all the history was sent out .. would that work for you?

@matiwinnetou
Copy link
Contributor Author

I think sending out Greetings message once all history has been send out is sensible. Alternatively it could be another Greetings message, when all history is processed.

So keep existing Greetings and introduce new message, e.g. "HistoryReplayed".

@matiwinnetou
Copy link
Contributor Author

I have incorrectly marked this ticket as a bug, it should be an enhancement.

@ch1bo ch1bo added 💭 idea An idea or feature request and removed bug 🐛 Something isn't working labels Apr 6, 2023
@v0d1ch v0d1ch self-assigned this Apr 6, 2023
@ch1bo ch1bo added this to the 0.10.0 milestone Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💭 idea An idea or feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants