ableegoldman commented on code in PR #12935:
URL: https://github.com/apache/kafka/pull/12935#discussion_r1042857583


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java:
##########
@@ -229,40 +230,34 @@ void openDB(final Map<String, Object> configs, final File 
stateDir) {
 
         // Setup statistics before the database is opened, otherwise the 
statistics are not updated
         // with the measurements from Rocks DB
-        maybeSetUpStatistics(configs);
-
+        statistics = userSpecifiedOptions.statistics();
+        if (statistics == null) {
+            if (RecordingLevel.forName((String) 
configs.get(METRICS_RECORDING_LEVEL_CONFIG)) == RecordingLevel.DEBUG) {
+                statistics = new Statistics();
+                dbOptions.setStatistics(statistics);
+            }
+            userSpecifiedStatistics = false;
+        } else {
+            userSpecifiedStatistics = true;
+        }

Review Comment:
   yeah watch out @lucasbru, don't mention code comments around @cadonna or 
he'll come after you 😜 



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to