Repository navigation
Don't lose a wake that follows the last within seconds - #203
Merged
Merged
Conversation
A message published while the stream was down was announced to nobody, and nothing read the inbox until the next message came. The first stream has nothing before it: the daemon's initial read covers that.
A wake within 20 seconds of the last was taken for a repeat of it, measured on the wall clock. A fast turn gets there: the workload wakes, answers and hibernates in seconds, and the next message wakes it again inside the window. That wake was dropped, so nothing read the inbox and the message sat unread until another one arrived. Every wake has a sleep behind it, so that is the test now: the signs of one wake have none between them however far apart they come, and two wakes have one however close. The keepalive's clock check uses the same floor, so a sleep shorter than a tick is seen too when both signals go missing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements agynio/architecture#195.
A lost wake. A sign of a wake within 20 seconds of the last was taken for a repeat, measured on the wall clock. A turn can start, end and hibernate again in seconds, so the wake for the next message lands in that window and was dropped. Nothing read the inbox, and the message sat unread until another one came. On the local VM that was the wake 9 seconds after a wake:
running idlefor over five minutes, until the next message.Every wake has a sleep behind it, so that is the test now: the signs of one wake have none between them however far apart they come, and two wakes have one however close. The keepalive's clock check uses the same one-second floor, so a sleep shorter than a tick is noticed too if both signals go missing.
A reopened stream. A message published while the Notifications stream was down was announced to nobody, and reopening it read nothing. It now asks for one inbox read. After a wake that means a second read, which finds nothing.
Verified on the local VM with this build in place of the published binary, restoring by copy: 7 wakes in a row, each message sent as soon as the workload had hibernated again, all answered in 1–3 s. The same run on 0.25.0 lost the second wake.
The reopened stream is covered by unit tests only.