oscerd commented on PR #739: URL: https://github.com/apache/camel-karaf/pull/739#issuecomment-5421112699
@jbonofre thanks — all seven threads are answered in `2c0676e26`, and the PR description has been rewritten to match where the change now stands rather than where it started. Summary of what moved: - **Callback locking** — `synchronized` is off `addingService` / `removedService`, and `createRegistry()` no longer calls the `ServiceTracker` at all: the callbacks maintain a `ConcurrentHashMap<ServiceReference, TypeConverterLoader>` and the rebuild iterates a sorted snapshot of it, so nothing calls into the tracker or the framework under this instance's monitor. - **`getDelegate()`** — plainly `synchronized`, no double-checked read. - **Use count** — ungets on the failure path, and on the normal `removedService` path, which leaked for every tracked loader rather than only the throwing ones. - **Converter loss** — fixed rather than logged, via the replay list you suggested. Two of the replies push back a little rather than just saying "done", so they are worth a look before you re-review: I could not reproduce the `Tracked` lock inversion against the reference `ServiceTracker` bytecode (the fix still stands, for other reasons), and always-locking `getDelegate()` does not actually close the stop-after-return race — I would rather say that than let the thread read as resolved. Details in the two threads. I have left all seven unresolved for you to close. **CI:** green on `2c0676e26`. The first run had one failure, `CamelQuartzITest.testResultMock` — `Expected: <1> but was: <2>` — which is a pre-existing flake rather than anything in this change: the route's cron is `0/1+*+*+*+*+?`, one trigger per second, against a mock asserting exactly one message, and Java 21 passed on the same commit while Java 17 failed. A re-run of the failed job went green with no code change. Happy to open a separate issue for that test. _Claude Code on behalf of Andrea Cosentino_ -- 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]
