unbridled-41 commented on PR #10991:
URL: https://github.com/apache/rocketmq/pull/10991#issuecomment-5468004283

   ### Test evidence (before → after)
   
   The regression tests were verified in both directions on JDK 8 (`mvn -pl 
broker test -Dtest=ConsumerOffsetManagerTest`):
   
   **On the unfixed code** (fix reverted, tests kept), the two regression tests 
now fail independently and each one demonstrates one defect:
   
   1. Data destruction — the filtered group's offsets are gone from the live 
table after the query:
   
   ```
   java.lang.AssertionError:
   Expecting actual:
     {"Topic@G1"={0=50L}}
   to contain key:
     "Topic@G2"
        at 
...ConsumerOffsetManagerTest.testQueryMinOffsetInAllGroupDoesNotDeleteOffsets
   ```
   
   Note the query *returned* while `Topic@G2` (30L) was silently deleted from 
`offsetTable`; with `RocksDBConsumerOffsetManager` this deletion is immediately 
persisted to RocksDB via `removeConsumerOffset`, and with JSON config it is 
persisted by the next `persist()`.
   
   2. Malformed key handling — `ArrayIndexOutOfBoundsException: Index 1 out of 
bounds for length 1` from `topicAtGroup.split(TOPIC_GROUP_SEPARATOR)[1]` on any 
`topic@group` key without `@`.
   
   **With this PR**: `Tests run: 7, Failures: 0, Errors: 0, Skipped: 0` (5 
pre-existing + 2 new tests).
   
   I split the originally single test into 
`testQueryMinOffsetInAllGroupDoesNotDeleteOffsets` and 
`testQueryMinOffsetInAllGroupToleratesMalformedKeys` (commit 906bab3c2) so that 
the offset-deletion failure is directly observable — previously the AIOOBE from 
the malformed key masked the deletion assertion.
   
   Side note on CI: the workflow runs for this PR are in `action_required` 
state (first-time contributor), so they will start once a maintainer approves 
them. Local checkstyle baseline (`style/rmq_checkstyle.xml`) reports ~14.9k 
pre-existing violations on develop itself; the change introduces no new 
violation categories beyond the long-line style already used throughout these 
files.


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