Jayho-h opened a new pull request, #10669:
URL: https://github.com/apache/rocketmq/pull/10669
## Summary
- serialize callbacks for each gRPC Telemetry stream while retaining the
existing shared client-manager executor
- preserve FIFO ordering between accepted commands and terminal callbacks,
enforce first-terminal-wins, and bound total queued work with a global
permit budget
- recover from executor rejection and pipeline failures without leaking
permits or leaving a terminated `GrpcClientChannel` falsely active
## Motivation
RIP-2 online-client lifecycle needs a deterministic Telemetry event order.
The current application submits callbacks independently, so Settings,
completion, and error callbacks can race and later lifecycle work cannot
safely decide which stream owns a client session.
This is an independently reviewable prerequisite for #10599. It does not add
session storage, public Admin RPCs, Lite/Broker changes, or an Admin server.
The follow-up Admin protocol work extends the existing `service Admin` from
apache/rocketmq-apis#113 and does not introduce a competing service in this
PR.
## Correctness notes
- one FIFO queue and drain state are owned by each Telemetry stream
- a single volatile immutable holder publishes a consistent executor/permit
pair without locking the normal hot path
- every normal, exceptional, and rejected event releases its permit in a
`finally` path
- response writes are serialized; writes after terminal never reach the
delegate and throw `IllegalStateException`, allowing
`GrpcClientChannel` to clear its observer and become inactive
## Verification
- JDK 8 focused tests: 13 passed, 0 failures/errors
- 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 three Proxy files:
- `GrpcMessagingApplication.java`
- `TelemetryDispatcher.java`
- `GrpcMessagingApplicationTest.java`
Three files are below the 5-10 file recommendation because the dispatcher,
its sole integration point, and the complete regression suite are the
smallest independently reviewable concurrency fix.
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]