3219378872 opened a new pull request, #11235:
URL: https://github.com/apache/rocketmq/pull/11235

   ### Which Issue(s) This PR Fixes
   
   Fixes #11234.
   
   ### Brief Description
   
   `ProxyAdminGrpcService.queryMessage` converted `ListMessageRequest` 
begin/end timestamps with `getSeconds()` only. `Timestamps.fromMillis` stores 
the fractional second in `nanos`, so a window such as `[1700000000500, 
1700000001250]` was sent to the broker as `[1700000000000, 1700000001000]`. The 
broker index compares those bounds with millisecond store timestamps, 
inclusive, so the window can shift by up to 999ms.
   
   The query bounds now use the same seconds-plus-nanos conversion 
`ResetGroupOffset` already uses. Unset bounds stay `0` and `Long.MAX_VALUE`. 
`GrpcConverter` is unchanged, including the receive-path `TIMER_DELAY_SEC` 
delivery timestamp covered by #10686.
   
   ### How Did You Test This Change?
   
   `ProxyAdminGrpcServiceTest#queryMessagePreservesSubSecondTimeRangeTest` 
failed on the unmodified proxy: the mocked `AdminService.queryMessage` was 
invoked with `1700000000000` and `1700000001000`. After the fix, the same test 
expects and observes `1700000000500` and `1700000001250`.
   
   The whole `ProxyAdminGrpcServiceTest` class then passed: 61 tests, 0 
failures, checkstyle 0 violations. JDK 8 (Temurin 8u504-b01) and Maven 3.8.7. 
JDK 21 cannot load the pinned Mockito agent for this module. No live broker was 
required: the defect is the bounds passed into `AdminService.queryMessage`.
   
   ```bash
   mvn -B -ntp -pl proxy -am test \
     -Dtest=ProxyAdminGrpcServiceTest \
     -DfailIfNoTests=false -Dspotbugs.skip=true
   ```
   
   Prepared with AI assistance.
   


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