Gargi-jais11 commented on code in PR #10307:
URL: https://github.com/apache/ozone/pull/10307#discussion_r3271890089


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java:
##########
@@ -636,8 +637,10 @@ public BackgroundTaskResult call() {
         if (moveSucceeded) {
           // Add current old container to pendingDeletionContainers.
           pendingDeletionContainers.put(System.currentTimeMillis() + 
replicaDeletionDelay, container);
-          ContainerLogger.logMoveSuccess(containerId, sourceVolume,
-              destVolume, containerSize, Time.monotonicNow() - startTime);
+          if (newContainer != null) {
+            ContainerLogger.logMoveSuccess(newContainer.getContainerData(), 
sourceVolume,
+                destVolume, containerSize, Time.monotonicNow() - startTime);
+          }

Review Comment:
   no need of throwing runtime exception for background task. And if 
moveSucceeded is false then there is already skips pending-deletion.



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