[
https://issues.apache.org/jira/browse/ARTEMIS-4626?focusedWorklogId=903051&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-903051
]
ASF GitHub Bot logged work on ARTEMIS-4626:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 01/Feb/24 14:19
Start Date: 01/Feb/24 14:19
Worklog Time Spent: 10m
Work Description: tabish121 commented on code in PR #4797:
URL: https://github.com/apache/activemq-artemis/pull/4797#discussion_r1474554919
##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/federation/internal/FederationQueueEntry.java:
##########
@@ -28,19 +33,19 @@
* on a federation resource such that it is not torn down until all demand has
been
* removed from the local resource.
*/
-public class FederationConsumerEntry {
+public class FederationQueueEntry {
private final FederationConsumerInternal consumer;
- private int references = 1;
+ private final Set<String> consumerDemand = new HashSet<>();
Review Comment:
I wanted to avoid any chance of leaking the ServerConsumer instance which
have lead to holding onto other resources in the past. If the notification
isn't sent and we don't remove the demand at least we aren't holding onto the
actual consumer.
Issue Time Tracking
-------------------
Worklog Id: (was: 903051)
Time Spent: 50m (was: 40m)
> AMQP Federation demand tracking can overcount demand
> ----------------------------------------------------
>
> Key: ARTEMIS-4626
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4626
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: AMQP
> Affects Versions: 2.32.0
> Reporter: Timothy A. Bish
> Assignee: Timothy A. Bish
> Priority: Major
> Fix For: 2.33.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> The demand tracking for Address bindings and Queue consumers that controls
> when a federation consumer is created and destroyed can race on start of
> federation with consumers or bindings being added and removed and over count
> the demand leading to the federation consumers not being shutdown when demand
> on the local broker drops to zero. A better mechanism of tracking needs to
> be added to make demand tracking idempotent for additions and removals of
> local demand and the startup demand checks
--
This message was sent by Atlassian Jira
(v8.20.10#820010)