FrankChen021 opened a new pull request, #19811:
URL: https://github.com/apache/druid/pull/19811
## Root cause
`checkOffsetAvailability` acquired `recordSupplierLock`, then validated the
record supplier assignment before entering the `try`/`finally` that releases
the lock. If the assignment did not contain the expected stream partition, the
validation threw `IllegalStateException` and permanently retained the reentrant
lock on that thread.
## Fix
Move the assignment validation into the existing `try` block so every path
after successful lock acquisition reaches the `finally` and unlocks.
Add a focused regression test that exercises the assignment-mismatch
exception and verifies that `recordSupplierLock` is no longer locked afterward.
## Impact
This prevents a malformed or unexpectedly changed record-supplier assignment
from leaking the supervisor's supplier lock and potentially blocking later
record-supplier operations. Successful offset-availability checks and lock
scope are unchanged.
## Validation
- `mvn -ntp -Pskip-static-checks -pl indexing-service
-Dtest=SeekableStreamSupervisorStateTest test`
- 60 tests run; 0 failures; 0 errors; 0 skipped
- `mvn -ntp -pl indexing-service -DskipTests checkstyle:check`
- 0 Checkstyle violations
- `git diff --check`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]