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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -251,8 +253,10 @@ public void shutdown() {
   @Override
   public synchronized void start() {
     if (deletionThreadPool == null || deletionThreadPool.isShutdown() || 
deletionThreadPool.isTerminated()) {
-      this.deletionThreadPool = new ThreadPoolExecutor(0, 
numberOfParallelThreadsPerStore,
-          super.getIntervalMillis(), TimeUnit.MILLISECONDS, new 
LinkedBlockingDeque<>(Integer.MAX_VALUE));
+      this.deletionThreadPool = new ThreadPoolExecutor(
+          numberOfParallelThreadsPerStore, numberOfParallelThreadsPerStore,
+          super.getIntervalMillis(), TimeUnit.MILLISECONDS,
+          new LinkedBlockingDeque<>(Integer.MAX_VALUE));

Review Comment:
   nit: please extract this to a function and reuse in the constructor



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -159,7 +159,7 @@ public class DirectoryDeletingService extends 
AbstractKeyDeletingService {
   private final SnapshotChainManager snapshotChainManager;
   private final boolean deepCleanSnapshots;
   private ExecutorService deletionThreadPool;
-  private final int numberOfParallelThreadsPerStore;
+  private int numberOfParallelThreadsPerStore;

Review Comment:
   ```
   M M IS: Inconsistent synchronization of 
org.apache.hadoop.ozone.om.service.DirectoryDeletingService.numberOfParallelThreadsPerStore;
 locked 75% of time  Unsynchronized access at 
DirectoryDeletingService.java:[line 609]
   ```
   
   
https://github.com/apache/ozone/actions/runs/24911426526/job/72953834270?pr=10125#step:16:18



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