zmuxuny opened a new pull request, #7169:
URL: https://github.com/apache/rocketmq-dashboard/pull/7169
### Which Issue(s) This PR Fixes
Fixes #7168.
### Brief Description
Consumer-group enrichment already has a three-second batch deadline and
detached response snapshots, but finishing a batch does not fully release its
queued work. Timeout cancellation leaves cancelled queue entries behind
occupied workers; caller interruption returns without cancelling the remaining
tasks, so those tasks can start broker reads after the listing has returned.
Cancel only the current batch's unfinished Futures in the existing finally
block, then purge cancelled queue entries before copying its snapshots. Declare
the executor explicitly as a ThreadPoolExecutor while retaining the existing
eight-worker, queue, timeout and response-default policies.
The new lifecycle regressions cover repeated timed-out pages, interrupted
callers, isolation of another concurrent batch and a later healthy listing.
Existing provider coverage continues to check partial completed connection data
and protection from late response mutation.
AI assistance was used for investigation, implementation and testing.
### How Did You Test This Change?
Base: `rocketmq-studio@127c47b06a268cc74224d5f34c56ec7c36ac0d55`. JDK
21.0.12.1, Maven 3.9.12.
- Pure baseline production: two new regressions failed with zero test
errors. Two default-sized 20-group pages retained queue sizes `[12, 32]` after
their deadlines; after an interrupted caller returned, `group-8` still reached
`examineConsumerConnectionInfo`.
- Final focused suite: **141 tests passed, 0 failures/errors/skips** across
RocketMQMetadataEnrichmentLifecycleTest (3), RocketMQMetadataProviderTest (54),
MetadataServiceTest (61) and ConsumerGroupControllerTest (23).
- Checkstyle: 0 violations. `git diff --check`: passed.
From `server/`, using the configured local Maven repository:
```sh
MAVEN_OPTS=-Xmx384m mvn -o -B -ntp test \
-DforkCount=1 \
-DargLine="-Xmx256m
-javaagent:$MAVEN_REPO/org/mockito/mockito-core/5.23.0/mockito-core-5.23.0.jar"
\
-Dtest=RocketMQMetadataEnrichmentLifecycleTest,RocketMQMetadataProviderTest,MetadataServiceTest,ConsumerGroupControllerTest
```
The explicit Mockito startup agent avoids dynamic-attachment limitations in
the test container. The broker calls are latch-controlled mocks, including an
interrupt-ignoring in-flight call. This does not establish behavior against a
real hung broker or promise forceful cancellation of running I/O.
Full backend/MySQL integration, frontend suites and upstream CI were not run
locally.
### Checklist
- [x] One coherent batch-lifecycle fix
- [x] Regression methods use the `...Test` suffix
- [x] New test source has the ASF header
- [x] No dependency, API, schema, UI or default-value changes
- [x] Existing snapshot and caller-interrupt contracts retained
--
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]