Bound event-loop termination waits and preserve close ownership - #357
Open
peter-lawrey wants to merge 4 commits into
Open
peter-lawrey wants to merge 4 commits into
peter-lawrey wants to merge 4 commits into
Conversation
The secondary shutdown waiter logged indefinitely after its deadline. Fail with one diagnostic using monotonic elapsed time, keep STOPPING truthful, and surface stop failure before AbstractCloseable can mark a live loop closed. Regression controls exercise expiry, interruption, callback failure and concurrent stop.
|
This branch has not been deployed
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.



A secondary caller stopping a stuck event loop continued polling after the five-minute deadline, producing an error every millisecond. Throw on timeout using monotonic elapsed time, retain STOPPING, and emit one bounded diagnostic with the loop, elapsed time, stopper and owned-thread stacks. Interruption retains its status; a failed callback remains visible to later callers.
Stop before entering AbstractCloseable's close machinery, which otherwise swallows the failure, marks the loop closed and can release its handlers. A failed wait leaves ownership intact; once the original stop finishes, normal close can complete. The deadline bounds secondary waits; it cannot forcibly complete an application stop callback.
Keep the clock, deadline, stopping thread and failure bookkeeping transient so reflective Wire marshalling retains the existing event-group configuration representation.
Regression coverage exercises normal/repeated and concurrent stop, expiry through stop and close, interruption, callback failure, bounded diagnostics and eventual cleanup. The downstream MarshallingEventGroupTest covers the configuration representation. Contract and diagnostic limits are documented in src/main/docs/bounded-termination.adoc. Validation results remain local.