davsclaus opened a new pull request, #26172:
URL: https://github.com/apache/camel/pull/26172

   ## Backport of #26112
   
   Cherry-pick of #26112 onto `camel-4.22.x`.
   
   **Original PR:** #26112 - CAMEL-24626: camel-master - leadership gets its 
own lock, and cancelled start tasks leave the task registry
   **Original author:** @henrik242
   **Target branch:** `camel-4.22.x`
   
   ### Original description
   
   Three follow-ups to CAMEL-24583 — both bugs are present on `camel-4.22.x` 
(the registry leak predates this work, and the lock inversion arrived with the 
backport of CAMEL-24583):
   
   1. **BackgroundTask registry leak:** `BackgroundTask.cancel()` now 
unschedules the task, releases its latch, marks it Inactive and removes it from 
the `TaskManagerRegistry`. A cancel-during-registration race is also guarded.
   
   2. **Lock inversion in MasterConsumer:** `doStop` held the BaseService lock 
and needed the cluster view's write lock; event dispatch held the view's read 
lock and needed the consumer's service lock. The leadership state now has a 
dedicated `leadershipLock`, released before touching the view.
   
   3. **Backoff documentation:** Clarifies that a leader exhausting 
`backOffMaxAttempts` consumes nothing until leadership changes, and that `0` 
retries indefinitely.


-- 
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]

Reply via email to