sites: one publish plane, retried only when the refusal can pass - #305
Merged
Merged
Conversation
The manager carried three copies of the same publish-and-retry loop — change, touched and reload frames — and each retried forever on any non-OK answer, so a permanent refusal (409: no site of this app has a hub) hammered the edge once a second and filled the log for the life of the manager. One publish helper now serves all three, and the answer decides the retry: the edge unreachable, 5xx or 429 retry with backoff as before; 404 means the edge no longer knows this registration, so the manager re-registers at once (the heartbeat's own path, run now instead of on its tick) and sends the frame under the new id rather than lose it; any other answer is the edge's verdict about the app — 409, or 400 for a malformed frame — warned once, after which frames are dropped quietly until the app registers again. A reloads test pins all three: the 404 re-registers before the frame lands, the 409 warns once and silences later frames, and a fresh registration lifts the silence.
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.
The manager carried three copies of the same publish-and-retry loop (change, touched, and reload frames), and each retried forever on any non-OK answer, so a permanent refusal (409: no site of this app has a hub) hammered the edge once a second and filled the log for the life of the manager.
One
publish(label, frame)helper now serves all three, and the answer decides the retry:A new reloads test pins all three: the 404 re-registers before the frame lands, the 409 warns exactly once and silences later frames, and a fresh registration lifts the silence. Against the consolidation without the 404 path, the test fails as expected: the frame that met the 404 was lost even though the heartbeat re-registered.
Sites lane: 15 suites, 141 tests passing.