Repository navigation
Keep heartbeat cleanup out of an active sliced release - #188
Open
viktor-ferenczi wants to merge 1 commit into
Open
viktor-ferenczi wants to merge 1 commit into
viktor-ferenczi wants to merge 1 commit into
Conversation
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 registry commits a handover before the source finishes closing its old grids. A heartbeat can report the lost ownership during a sliced release. The stale-ownership handler then closes every remaining grid in the same simulation update, bypassing
release.closePerFrame.The source now defers a queued discard while a release of the same partition and generation is active. Other partitions continue through the queue. A failed release gives the discard another chance on the next update. Fencing and termination still allow immediate cleanup.
Verification
P3-HND-RELEASE-OWNERSHIPtransfers 144 grids withrelease.closePerFrame=1. The release spans multiple real registry heartbeats. All 144 grid IDs reached the destination in both runs.The existing fenced-node recovery scenario
P1-REC-16also passed. The old node discarded its doomed copies and exited, and the other node recovered the original station in the correct partition.An occupied replay caught the same race on a larger partition. The source logged its stale-ownership purge at the end of a 506 ms simulation interval, with only 0.1 ms in that frame's release callback. In two earlier warm transfers with a cap of four, the longest simulation intervals during release were 506 and 252 ms.
One warm repeat with this change closed 106 roots across 28 nonempty batches. Its longest source interval during release was 193.5 ms. The destination accepted client traffic at 5.009 s and the source finished at 6.049 s. The moving client's local P99/maximum update intervals were 24.1/24.7 ms. The destination bystander's were 41.7/43.9 ms, between the earlier warm single-worker results of 31.5/33.0 and 45.0/55.3 ms. The queue regression establishes the fix. The player measurements come from one warm fixed run on a changing partition. SE-1908