zmuxuny opened a new pull request, #7391:
URL: https://github.com/apache/rocketmq-dashboard/pull/7391

   ## Which Issue(s) This PR Fixes
   
   Fixes #7168. Replaces #7169, which the seven-day stale bot closed while the 
branch remained available. The issue was also stale-bot closed; the 
queue-lifecycle defect remains reproducible on current `rocketmq-studio`.
   
   ## Brief Description
   
   Consumer-group enrichment already uses one three-second batch deadline and 
detached response snapshots. Finishing a batch does not release all of its 
queued work: timeout cancellation leaves cancelled queue entries behind 
occupied workers, and caller interruption leaves unfinished tasks able to begin 
broker reads after the listing has returned.
   
   Cancel this batch's unfinished futures in the existing `finally` block, then 
purge cancelled queue entries before copying its snapshots. Use the equivalent 
explicit `ThreadPoolExecutor` while retaining the eight workers, daemon 
factory, queue policy, deadline and response defaults. The shared purge may 
remove already-cancelled nodes from another batch, but does not cancel another 
batch's active work.
   
   The three latch-controlled regressions cover repeated timed-out pages, 
interrupted callers, another concurrent batch and a later healthy listing. 
Existing provider tests cover partial completed connection data and late-result 
snapshot isolation. This does not promise to forcefully stop a running broker 
call that ignores interruption.
   
   AI assistance was used for investigation, implementation and testing.
   
   ## How Did You Test This Change?
   
   Fresh verification on November 4, 2026 against 
`rocketmq-studio@7abf8adaf660d75f2d686bbe8741be76c3a5ddd3`; exact candidate 
head `91f932accf99d115a67b97ae85d2cf37af1acbbb`. Temurin JDK 21.0.13+9, Maven 
3.9.9 and the repository-pinned dependencies from an offline local cache.
   
   - Replaced only production `RocketMQMetadataProvider.java` with current 
upstream and retained the candidate tests: **2 tests, 2 intended failures, 0 
errors/skips**. The two timed-out 20-group pages retained queue sizes **[12, 
32]** instead of **[0, 0]**. The interrupted-caller case observed 
`examineConsumerConnectionInfo("group-8")` after the caller returned.
   - Candidate lifecycle class and three restored repeat runs: **3/3 passing in 
each run**, keeping the original latch waits and real three-second deadline 
unchanged.
   - Focused provider/metadata/controller suite: **161 tests, 0 
failures/errors/skips**. Lifecycle 3, MetadataProvider 58, MetadataService 76 
and ConsumerGroupController 24.
   - Expanded Apache-provider, metadata, group validation/diagnostics and 
instance-count-runner suite: **693 tests in 24 classes, 0 
failures/errors/skips**. These counts overlap the focused suite.
   - RAT and Checkstyle passed through the normal Maven test lifecycle; zero 
Checkstyle violations. Java 21 compiled all main and test sources. Final `git 
diff --check` passed and the worktree remained clean.
   
   Focused reproduction command from `server/`, with the local Maven cache 
selected:
   
   ```bash
   mvn -o -B -ntp test -DforkCount=1 \
     -DargLine="-Xmx512m 
-javaagent:$MAVEN_REPO/org/mockito/mockito-core/5.23.0/mockito-core-5.23.0.jar" 
\
     
-Dtest=RocketMQMetadataEnrichmentLifecycleTest,RocketMQMetadataProviderTest,MetadataServiceTest,ConsumerGroupControllerTest
   ```
   
   The Mockito startup agent avoids dynamic-attachment limitations. Broker 
calls are controlled mocks, including interrupt-ignoring calls. Some RocketMQ 
appenders could not create their default log directory in the test environment; 
no candidate test failed or errored.
   
   The separate `mvn -o -DskipTests package` check stopped before packaging 
because `maven-jar-plugin:3.5.0` was absent from the offline cache. Package and 
embedded-binary license validation are therefore not claimed as passed. No POM, 
dependency, assertion or timeout was changed. Full backend/MySQL integration, 
frontend checks and live-broker validation were not run locally.
   
   ## Checklist
   
   - [x] One coherent batch-lifecycle fix; two-file delta only
   - [x] Regression methods use the `...Test` suffix and the new source has the 
ASF header
   - [x] Current-base negative controls reproduce the defect
   - [x] Current head passes provider, metadata and controller coverage
   - [x] Existing snapshot and caller-interrupt contracts retained
   - [x] No dependency, API, schema, UI or default-value changes
   - [ ] Package verification and full upstream CI remain to be established
   


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