You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "arunsarin85 (via GitHub)" <gi...@apache.org> on 2026/06/25 09:02:28 UTC
Re: [PR] HDDS-15651. Test case for DiskBalancer when markContainerForDelete fails [ozone]
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: 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