arunsarin85 commented on code in PR #10593:
URL: https://github.com/apache/ozone/pull/10593#discussion_r3473145233


##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/diskbalancer/TestDiskBalancerTask.java:
##########
@@ -504,6 +504,109 @@ public void 
moveFailsDuringInMemoryUpdate(ContainerTestVersionInfo versionInfo)
     assertEquals(initialSourceDelta, 
diskBalancerService.getDeltaSizes().get(sourceVolume));
   }
 
+  /**
+   * HDDS-15651. When markContainerForDelete fails after import and 
ContainerSet update,
+   * the move is still reported as success, the destination replica is active, 
the source
+   * replica is queued for lazy deletion, and cleanup removes it after the 
delay.
+   */
+  @ContainerTestVersionInfo.ContainerTest
+  public void moveSucceedsWhenMarkContainerForDeleteFails(
+      ContainerTestVersionInfo versionInfo)
+      throws IOException, InterruptedException, TimeoutException {
+    setLayoutAndSchemaForTest(versionInfo);
+    long delay = 2_000L;
+    diskBalancerService.setReplicaDeletionDelay(delay);
+
+    KeyValueContainer container = createContainer(CONTAINER_ID, sourceVolume, 
State.CLOSED);
+    File oldContainerDir = new 
File(container.getContainerData().getContainerPath());
+    Path destDirPath = Paths.get(
+        KeyValueContainerLocationUtil.getBaseContainerLocation(
+            destVolume.getHddsRootDir().toString(), scmId, CONTAINER_ID));
+    assertFalse(Files.exists(destDirPath),

Review Comment:
   Added a patch. 



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