aoright opened a new pull request, #11277: URL: https://github.com/apache/rocketmq/pull/11277
## What is the purpose of the change Fixes #11234 When ProxyAdminGrpcService processes queryMessage requests specifying beginTimestamp or endTimestamp, it previously only converted timestamp.getSeconds() to milliseconds (TimeUnit.SECONDS.toMillis(...)), discarding timestamp.getNanos(). As a result, fractional subsecond timestamps (milliseconds) were truncated to 000ms, distorting query time boundaries. This change adds TimeUnit.NANOSECONDS.toMillis(timestamp.getNanos()) to both begin and end timestamp calculations, preserving millisecond precision. ## Brief changelog - proxy/src/main/java/org/apache/rocketmq/proxy/grpc/admin/ProxyAdminGrpcService.java: Include fractional nanoseconds converted to milliseconds in begin and end timestamps. - proxy/src/test/java/org/apache/rocketmq/proxy/grpc/admin/ProxyAdminGrpcServiceTest.java: Add unit test queryMessagePreservesSubsecondTimestampsTest. ## Verifying this change - Tested with mvn test -Dtest=ProxyAdminGrpcServiceTest -pl proxy -am -DfailIfNoTests=false -Dspotbugs.skip=true -Dcheckstyle.skip=true: 61 tests passed with 0 failures and 0 errors. -- 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]
