ChenSammi commented on code in PR #6611:
URL: https://github.com/apache/ozone/pull/6611#discussion_r1599523861


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/OzoneContainer.java:
##########
@@ -157,9 +160,22 @@ public OzoneContainer(
     dbVolumeSet = HddsServerUtil.getDatanodeDbDirs(conf).isEmpty() ? null :
         new MutableVolumeSet(datanodeDetails.getUuidString(), conf,
             context, VolumeType.DB_VOLUME, volumeChecker);
+    final DatanodeConfiguration dnConf =
+        conf.getObject(DatanodeConfiguration.class);
     if (SchemaV3.isFinalizedAndEnabled(config)) {
       HddsVolumeUtil.loadAllHddsVolumeDbStore(
           volumeSet, dbVolumeSet, false, LOG);
+      if (dnConf.autoCompactionSmallSstFile()) {
+        this.compactExecutor = Executors.newScheduledThreadPool(
+            dbVolumeSet != null ? 1 :

Review Comment:
   I guess this thread pool is to accelerate the db compaction. So the thread 
count matters when there are multiple rocksdb to compact.  The rocksdb and 
HddsVolume has a 1:1 mapping. So evern  dbVolumeSet is set, if there are 10 
HddsVolume configured, there will be 10 RocksDB to compact. So there I think 
dbVolumeSet null check is not required.  



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