Sean-Walker0 opened a new pull request, #7639:
URL: https://github.com/apache/shenyu/pull/7639

   Fixes #7636
   
   ## Modifications
   
   The fallback retry map keyed pending URI registrations by `selectorName + 
rpcType` only, although `FallbackHolder` carries the `namespaceId`. Concrete 
cross-namespace corruption: a successful `registerURI` of the **same selector 
name in another namespace** executed `removeFallBack(key)` and silently dropped 
the first namespace's pending retry; a failing one replaced the pending entry's 
namespace identity. Either way, namespace A's registration was never retried or 
was retried with the wrong identity.
   
   The namespace is now part of the key used consistently by enqueue, removal 
and recovery:
   
   ```java
   private String key(final String selectorName, final String namespaceId) {
       return String.join(":", selectorName, 
PluginNameAdapter.rpcTypeAdapter(rpcType()), namespaceId);
   }
   ```
   
   ## Verifying this change
   
   - [x] New 
`FallbackShenyuClientRegisterServiceTest#fallbackRetryIsNamespaced` — namespace 
A's registration fails (pending retry queued), then namespace B registers the 
same selector name successfully; A's pending retry must survive and B must 
leave none. Red on the pre-fix code (`namespace A's pending retry must survive 
... expected: <true> but was: <false>` — B's registration removed A's entry), 
green after.
   - [x] `./mvnw -pl shenyu-admin -am test -B 
-Dtest=FallbackShenyuClientRegisterServiceTest` — 6/6 green (5 pre-existing 
cases unchanged), module checkstyle clean.
   
   ## Notes
   
   - Behavior change: pending retries are now isolated per namespace — which is 
the multi-tenant invariant the `namespaceId` parameter already promises. The 
retry cadence and payload handling are untouched.
   - This continues the namespace-isolation family of fixes 
(#7524/#7525/#7526/#7571).
   - Orthogonality: no open PR modifies `FallbackShenyuClientRegisterService` 
(verified against the file lists of all 70 open PRs).
   
   Make sure that:
   
   - [x] You have read the [contribution 
guidelines](https://shenyu.apache.org/community/contributor-guide).
   - [x] You submit test cases (unit or integration tests) that back your 
changes.
   - [x] Your local test passed `./mvnw clean install 
-Dmaven.javadoc.skip=true` (module-scoped: `shenyu-admin` targeted test class + 
checkstyle green; full-module suite left to CI as with the other admin PRs).


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