Jess668 commented on code in PR #22853:
URL: https://github.com/apache/kafka/pull/22853#discussion_r3639030087
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredSessionStoreWithHeaders.java:
##########
@@ -183,21 +187,28 @@ public <R> QueryResult<R> query(
final PositionBound positionBound,
final QueryConfig config
) {
- final long start = config.isCollectExecutionInfo() ? System.nanoTime()
: -1L;
+ final long start = time.nanoseconds();
Review Comment:
for two reasons
1) query timing uses the same clock the rest of the metered store already
measures with, and
2) is test-controllable — the …WhenRequested builder tests now assert the
metered entry reads a deterministic in 0ns under a frozen MockTime
--
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]