mcvsubbu commented on a change in pull request #3913: Adding the support for sampling logs URL: https://github.com/apache/incubator-pinot/pull/3913#discussion_r263046286
########## File path: pinot-core/src/main/java/org/apache/pinot/core/query/scheduler/QueryScheduler.java ########## @@ -170,13 +181,17 @@ public void stop() { TimerContext timerContext = queryRequest.getTimerContext(); int numSegmentsQueried = queryRequest.getSegmentsToQuery().size(); - LOGGER.info( - "Processed requestId={},table={},segments(queried/processed/matched)={}/{}/{},schedulerWaitMs={},totalExecMs={},totalTimeMs={},broker={},numDocsScanned={},scanInFilter={},scanPostFilter={},sched={}", - requestId, tableNameWithType, numSegmentsQueried, numSegmentsProcessed, numSegmentsMatched, - timerContext.getPhaseDurationMs(ServerQueryPhase.SCHEDULER_WAIT), - timerContext.getPhaseDurationMs(ServerQueryPhase.QUERY_PROCESSING), - timerContext.getPhaseDurationMs(ServerQueryPhase.TOTAL_QUERY_TIME), queryRequest.getBrokerId(), numDocsScanned, - numEntriesScannedInFilter, numEntriesScannedPostFilter, name()); + + // Sampling the query log based on the sampling rate configuration + if (queryLogSamplingRate > RANDOM.nextFloat()) { Review comment: Same as broker. Maybe we should log under certain conditions even if random criteria is not met. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org