#310: log when a reap is skipped because the record changed
The compare-and-release declines silently. This race is unobservable by construction, so a reaper that quietly stops reaping is the hardest kind of behaviour to diagnose later. One debug line names the pane and the likely cause.
This commit is contained in:
@@ -294,6 +294,11 @@ public final class SessionManager implements TurnListener {
|
||||
*/
|
||||
private boolean releaseIfCurrent(MemberSession expected, ReleaseCause cause) {
|
||||
if (!registry.remove(expected.paneId(), expected)) {
|
||||
// A lifecycle transition replaced the record between the caller's check and this remove.
|
||||
// Log it: this race is by definition unobservable otherwise, and a reaper that silently
|
||||
// declines to reap is the hardest kind of behaviour to diagnose after the fact.
|
||||
log.debug("skipping reap of pane={}: its registry record changed after the idle check "
|
||||
+ "(most likely a delivery made it BUSY)", expected.paneId());
|
||||
return false;
|
||||
}
|
||||
releaseRemoved(expected.paneId(), expected, handles.remove(expected.paneId()), cause);
|
||||
|
||||
Reference in New Issue
Block a user