konlue commented on PR #7939:
URL: https://github.com/apache/shenyu/pull/7939#issuecomment-6315979526

   All addressed:
   
   1. **Ownership index cleanup**: `remove` now clears the ownership index with 
the conditional two-arg remove, so a clean disconnect releases the id and a 
stale channel closing late cannot evict its replacement — pinned by a new test 
asserting `isOwner` turns false after a clean disconnect.
   2. **Ownership transfer centralized**: `add` no longer writes the ownership 
index; ownership is transferred by `takeover` alone (`DisconnectDispatchTest` 
now registers through `takeover`, matching production).
   
   Also took the non-blocking points:
   - The maps are instance fields now, so the lock and the state share a 
lifetime and `new ChannelRepository()` gives real test isolation.
   - The class Javadoc documents that dropping the replaced connection's will 
on takeover is a deliberate deviation from EMQX/Mosquitto behavior.
   - The takeover-before-close ordering you verified now carries a comment at 
the call site.


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