BobSong-dev opened a new pull request, #7344:
URL: https://github.com/apache/shenyu/pull/7344

   Fixes #7316
   
   ## Background
   
   `ShenyuWebsocketClient#onMessage` catches any `RuntimeException` from 
parsing or applying a
   configuration message and logs "the message will be ignored". The connection 
stays open and
   healthy-looking while the gateway cache has permanently diverged from Admin, 
because the
   websocket protocol carries no ACK or replay cursor. There is no bounded 
recovery either:
   deterministic poison data would be silently skipped forever.
   
   ## Changes
   
   - Application and parse failures are no longer silent: the first failure 
closes the
     connection so the existing reconnect machinery kicks in, and reconnect 
always requests a
     full `MYSELF` snapshot before incremental delivery resumes;
   - Failures carry the config group and event type in the log (no message 
payload, so no
     secret leakage);
   - A consecutive-failure counter bounds recovery: after 3 consecutive 
failures the client
     stops auto-reconnecting (`nowClose`) with a terminal error, preventing 
reconnect storms
     from deterministic poison data; any successful application resets the 
counter;
   - Connection state and listener behavior for healthy sessions are unchanged.
   
   Note: full readiness gating during initial sync is tracked separately in 
#7283.
   
   ## Verification
   
   Local:
   - `./mvnw test -pl shenyu-sync-data-center/shenyu-sync-data-websocket -am`: 
BUILD SUCCESS;
     Tests run: 81, Failures: 0, Errors: 0 (new tests cover transient failure 
with resync,
     poison data give-up after bounded attempts, and counter reset on success);
   - `./mvnw checkstyle:check`: passed.


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