wy471x commented on issue #6746:
URL: https://github.com/apache/shenyu/issues/6746#issuecomment-5929226317

   Fixed by #6913 (merged 2026-09-30). Although that PR was targeted at QoS 
delivery, it also removed the get-then-put pattern described here.
   
   Current master (`a12aa3e5`) `SubscribeRepository`:
   - `add(List<String>, Map<Channel, MqttQoS>)` (:46-47) and `add(Channel, 
List<MqttTopicSubscription>)` (:59-60) obtain the canonical per-topic map via 
`TOPIC_CHANNEL_FACTORY.computeIfAbsent(topic, k -> new ConcurrentHashMap<>())` 
and add the subscriber atomically with `merge(channel, qos, maxQoS)`. No more 
transient list + `put`, so concurrent subscribers to a new topic can no longer 
overwrite each other.
   - The read paths (:94, :105) use `getOrDefault(topic, 
Collections.emptyMap())` and never insert a transient collection.
   
   Closing as resolved.
   


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