jtuglu-netflix commented on code in PR #17847:
URL: https://github.com/apache/druid/pull/17847#discussion_r2066791245
##########
server/src/main/java/org/apache/druid/segment/realtime/appenderator/StreamAppenderator.java:
##########
@@ -288,6 +295,15 @@ public Object startJob()
initializeExecutors();
resetNextFlush();
sinkSchemaAnnouncer.start();
+
+ if (timeExecutor != null) {
+ timeExecutor.scheduleAtFixedRate(
+ () -> currTimeMs = System.currentTimeMillis(),
+ 0,
+ 1,
+ TimeUnit.MILLISECONDS
+ );
Review Comment:
This was the simplest way to avoid the performance overhead of calling the
time function in the main loop. On Linux, this adds a significant performance
penalty (24ns/row/call). I indicated this in the PR description.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]