Skip to content

Fix ControlledRealTimeReopenThread.close() to wake waiters on interrupt#16210

Open
iprithv wants to merge 1 commit into
apache:mainfrom
iprithv:fix-crt-close-interrupt-race
Open

Fix ControlledRealTimeReopenThread.close() to wake waiters on interrupt#16210
iprithv wants to merge 1 commit into
apache:mainfrom
iprithv:fix-crt-close-interrupt-race

Conversation

@iprithv

@iprithv iprithv commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

close() calls join() on the background thread, then bumps searchingGen to Long.MAX_VALUE and notifyAll()s waiters. If join() throws InterruptedException, the rethrow happened before the bump + notify, so threads in waitForGeneration(targetGen, -1) with targetGen > searchingGen hung forever.

so moved the cleanup into a finally block around join().

@github-actions github-actions Bot added this to the 10.5.0 milestone Jun 7, 2026
@iprithv iprithv force-pushed the fix-crt-close-interrupt-race branch from 91227e1 to d82d7d0 Compare June 7, 2026 16:35
@iprithv iprithv force-pushed the fix-crt-close-interrupt-race branch from d82d7d0 to 16f3694 Compare June 7, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant