adoroszlai commented on code in PR #6055:
URL: https://github.com/apache/ozone/pull/6055#discussion_r1465485936


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/DBStoreBuilder.java:
##########
@@ -188,6 +191,11 @@ private void setDBOptionsProps(ManagedDBOptions dbOptions) 
{
     if (maxNumberOfOpenFiles != null) {
       dbOptions.setMaxOpenFiles(maxNumberOfOpenFiles);
     }
+    if (!rocksDbStat.equals(OZONE_METADATA_STORE_ROCKSDB_STATISTICS_OFF)) {
+      statistics = new ManagedStatistics();
+      statistics.setStatsLevel(StatsLevel.valueOf(rocksDbStat));
+      dbOptions.setStatistics(statistics);
+    }

Review Comment:
   nit: `ManagedStatistics statistics` could be a local variable in `build()`.
   
   I don't think it makes any difference functionally, but it would be easier 
to follow its lifecycle.  With instance variable, the reader needs to consider 
what happens if the same builder is used to build multiple `RDBStore` instances.



-- 
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]

Reply via email to