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

   ## CAMEL-26570: camel-milo - deliver the loss report of a consumer started 
without a connection off the request pool
   
   Since CAMEL-25835 a consumer that starts while its connection is not up gets 
`Bad_NoCommunication` for its nodes. `SubscriptionManager.registerItems` 
delivered that report on the `MiloClient` pool of the connection (CAMEL-25713), 
and the consumer runs its route on that thread. The same pool completes the 
producer requests and has as many threads as there are processors.
   
   So a route that waits for a request of the same connection on that report 
(an awaited write, read or method call, sent once the connection is up, for 
example by a redelivery) waits for an outcome that is queued behind itself. 
With as many such consumers as the pool has threads (one in a single-CPU 
container), no request of the connection completes any more, and the other 
consumers of the connection stop receiving values.
   
   ### Fix
   
   The report is delivered on Milo's shared executor (`Stack.sharedExecutor()`, 
the cached pool the clients deliver the values on), not on the request pool. 
This is not the `milo-shared-scheduled-executor` that CAMEL-25713 moved the 
requests off. The report keeps generation 0, so it is still dropped once a 
connection has delivered a value.
   
   ### Tests
   
   
`CommunicationLossTest.consumerThatWaitsForAWriteOnItsLossReportCompletesWithOneThread`:
 a manager with a request pool of one thread, as with one processor, starts 
while the relay is down. Its consumer writes from the report once the 
connection is up and waits for the outcome. The test fails on main (the write 
times out) and passes with the fix 20 times in a row; the camel-milo tests 
pass. Found with a TLA+ model of the connection.
   
   No upgrade guide entry: the report and the per-connection pool are not 
released yet (4.24.0).
   
   cc @etzel-mes (CAMEL-25835, CAMEL-25713)
   
   _Claude Code on behalf of allthingssecurity_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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