Jayho-h opened a new pull request, #10670:
URL: https://github.com/apache/rocketmq/pull/10670

   ## Summary
   
   - give each local gRPC client session an immutable manager-local generation,
     connection timestamp, and monotonic last-active timestamp
   - serialize lifecycle operations per client ID, with expected-channel removal
     and `runIfCurrent`/touch primitives for race-safe follow-up integration
   - bind cached client Settings to a session generation while preserving the
     existing legacy/remote last-write-wins API
   
   ## Motivation
   
   RIP-2 needs a reliable source of truth for online gRPC clients before it can
   expose list/detail Admin APIs. The previous client-ID map had no session
   identity, so a delayed callback from an old Telemetry stream could remove or
   overwrite state belonging to a replacement stream.
   
   This is an independently reviewable foundation for #10599. It intentionally
   does not change `ClientActivity`, add public Admin RPCs, or touch Broker/Lite
   behavior.
   
   The follow-up Admin implementation extends the existing `service Admin` from
   apache/rocketmq-apis#113 rather than introducing a competing service.
   
   ## Correctness notes
   
   - lifecycle operations for the same client use a ref-counted per-client lock;
     different client IDs do not share a global lock
   - lock holders are retained before waiting and reclaimed after the last
     reference, preventing ABA replacement while keeping the lock table bounded
   - channel removal and activity updates require the exact expected channel
   - Settings updates accept the same/newer generation and reject an older
     generation; conditional cleanup removes only the exact owner
   - the Settings map is instance-scoped to the paired channel manager, so equal
     manager-local generations cannot read or delete another activity instance
     state
   - the existing three-argument Settings update and unconditional removal 
remain
     compatible for legacy/remote registration
   
   ## Verification
   
   - JDK 8 focused tests: 34 passed, 0 failures/errors/skips
   - complete integrated JDK 8 release gate: 277 passed, 0 failures/errors/skips
   - JDK 17 clean 11-module package: BUILD SUCCESS
   - Checkstyle: 0 violations
   - SpotBugs: 0 bugs/errors
   - `git diff --check upstream/develop...HEAD`
   
   ## Scope
   
   Exactly six Proxy files:
   
   - `GrpcChannelManager.java`
   - `GrpcClientChannel.java`
   - `GrpcClientSettingsManager.java`
   - `GrpcChannelManagerTest.java`
   - `GrpcClientChannelTest.java`
   - `GrpcClientSettingsManagerTest.java`
   
   Refs #10599
   Refs #10600
   


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