sodonnel commented on code in PR #4432:
URL: https://github.com/apache/ozone/pull/4432#discussion_r1143292094
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/SCMBlockDeletingService.java:
##########
@@ -225,7 +235,16 @@ public void notifyStatusChanged() {
public boolean shouldRun() {
serviceLock.lock();
try {
- return serviceStatus == ServiceStatus.RUNNING;
+ long alreadyWaitTimeInMillis = clock.millis() -
lastTimeToBeReadyInMillis;
+ boolean run = serviceStatus == ServiceStatus.RUNNING &&
+ (alreadyWaitTimeInMillis >= waitTimeInMillis);
+ if (LOG.isDebugEnabled()) {
Review Comment:
We don't need the `if (LOG.isDebugEnabled()) {` here as the parameters to
`LOG.debug` are simple. Inside `LOG.debug` is has an `isDebugEnabled()` check.
--
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]