[
https://issues.apache.org/jira/browse/CAMEL-26114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Serdar Gökay resolved CAMEL-26114.
----------------------------------
Fix Version/s: 4.24.0
Assignee: Serdar Gökay
Resolution: Fixed
Fixed by apache/camel#28511 (CAMEL-26112), commit 2153de294220 on main, 4.24.0.
{{onTransferFailed}} now takes {{lock}} and tears the connection down only when
{{isCurrent(subscription)}} holds, the same check {{recoverSubscription}} uses.
A transfer that fails on a client that was already replaced is ignored. The
guard was asked for in the review of that PR, so it landed there instead of in
a PR of its own.
No deterministic test: the embedded test server cannot reject
TransferSubscriptions while the old client is in Transferring.
> camel-milo - onTransferFailed tears down the current connection without
> checking that it is the one whose transfer failed
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26114
> URL: https://issues.apache.org/jira/browse/CAMEL-26114
> Project: Camel
> Issue Type: Bug
> Components: camel-milo
> Affects Versions: 4.23.0
> Reporter: Serdar Gökay
> Assignee: Serdar Gökay
> Priority: Minor
> Fix For: 4.24.0
>
>
> Follow-up of CAMEL-25912, named there as not done.
> {{SubscriptionManager.SubscriptionListenerImpl.onTransferFailed()}} calls
> {{handleConnectionFailure()}}, which tears down whichever connection the
> manager holds at that moment and triggers a rebuild. It does not check that
> the subscription whose transfer failed belongs to that connection. When the
> listener of an already replaced connection reports a failed transfer late,
> the replacement is torn down and rebuilt for nothing, and the consumers of
> the connection lose their values once more. This is the same class of defect
> as the producer teardown removed by CAMEL-25912, where a write that failed on
> a disposed connection tore down its replacement.
> Fix: ignore the report when the listener belongs to a connection that was
> already disposed, and tear down the connection only when it is the current
> one.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)