yangjj-iso opened a new pull request, #7660:
URL: https://github.com/apache/shenyu/pull/7660

   Fixes #6480.
   
   Proxy-selector node/path keys contain selector IDs, but deletion handling 
puts that value in the name field and removes TCP listeners by name. When the 
configured name differs from the ID, the listener can remain running. Path 
synchronization also overwrites the real name on creation/update with the key's 
ID.
   
   Keep the path payload's name and populate the ID from the key. Node deletion 
notifications likewise carry the ID. Document that deletion notifications may 
contain only the plugin name and selector ID.
   
   The common subscriber remembers the name of each successfully applied 
selector, indexed by plugin and ID, and resolves ID-only deletions before 
calling the existing name-based handler. Full notifications and legacy 
name-only removals remain supported. Successful deletion and refresh discard 
remembered identities; failed updates/removals preserve the previously applied 
identity for retry. Unknown ID-only deletions are harmless.
   
   Regression coverage includes both path and node synchronization through the 
real common subscriber and TCP handler. Each case starts a real listener with 
different ID/name values, deletes it through the synchronization path, verifies 
listener/upstream cache cleanup, and rebinds its port. Subscriber tests cover 
plugin isolation, full/ID-only/name-only notifications, duplicate deletion, 
refresh, and failed update/removal recovery.
   
   Validation:
   - Against the original implementation, the initial regression run reports 9 
failures, including both real TCP lifecycle cases.
   - After the fix, all 58 selected synchronization, subscriber, TCP plugin, 
and TCP protocol tests pass with zero failures/errors/skips.
   - Checkstyle and Apache RAT pass across the affected reactor; `git diff 
--check` passes.
   - Full-repository install and a deployed multi-process cluster were not run 
locally.
   
   ```sh
   ./mvnw -B -ntp -pl shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-tcp -am 
test \
     
'-Dtest=AbstractNodeDataSyncServiceTest,AbstractPathDataSyncServiceTest,CommonProxySelectorDataSubscriberTest,ProxySelectorIdentityDeletionTest,Tcp*Test,UpstreamProviderTest'
 \
     -Dsurefire.failIfNoSpecifiedTests=false -DskipRemoteResources=true \
     -Djacoco.skip=true -Dmaven.javadoc.skip=true
   ./mvnw -B -ntp -pl shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-tcp -am 
apache-rat:check -DskipRemoteResources=true
   ```
   
   - [x] Read the [contribution 
guidelines](https://shenyu.apache.org/community/contributor-guide/).
   - [x] Submit regression tests.
   - [ ] Full local `./mvnw clean install -Dmaven.javadoc.skip=true` 
(affected-reactor validation above).
   


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