You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sodonnel (via GitHub)" <gi...@apache.org> on 2023/03/21 12:17:54 UTC

[GitHub] [ozone] sodonnel commented on a diff in pull request #4432: HDDS-8223. SCM delete block service shoud run wait for safemode to exit.

sodonnel commented on code in PR #4432:
URL: https://github.com/apache/ozone/pull/4432#discussion_r1143287530


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/BlockManagerImpl.java:
##########
@@ -117,11 +118,17 @@ public BlockManagerImpl(final ConfigurationSource conf,
             OZONE_BLOCK_DELETING_SERVICE_TIMEOUT,
             OZONE_BLOCK_DELETING_SERVICE_TIMEOUT_DEFAULT,
             TimeUnit.MILLISECONDS);
+
+    long waitTimeInMillis = conf.getTimeDuration(
+        HddsConfigKeys.HDDS_SCM_WAIT_TIME_AFTER_SAFE_MODE_EXIT,
+        HddsConfigKeys.HDDS_SCM_WAIT_TIME_AFTER_SAFE_MODE_EXIT_DEFAULT,
+        TimeUnit.MILLISECONDS);
+
     blockDeletingService =
         new SCMBlockDeletingService(deletedBlockLog,
             scm.getScmNodeManager(), scm.getEventQueue(), scm.getScmContext(),
             scm.getSCMServiceManager(), svcInterval, serviceTimeout, conf,
-            metrics);
+            metrics, waitTimeInMillis, scm.getSystemClock());

Review Comment:
   The conf object is already passed into the SCMBlockDeletingService constructor. Rather than adding more parameters, could we remove the parameters for svcInterval, serviceTimeout and waitTimeInMillis and pull then out of the conf object inside SCMBlockDeletingService? Then we can also remove the checkstyle `@SuppressWarnings("parameternumber")` on the constructor.



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org