This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 9dab4d2173 HDDS-10487. Intermittent crash in TestSnapshotDiffManager 
(#6346)
9dab4d2173 is described below

commit 9dab4d21735e80a997e7941d17719bd7532fa828
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Thu Mar 7 21:07:22 2024 +0100

    HDDS-10487. Intermittent crash in TestSnapshotDiffManager (#6346)
---
 .../org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java  | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java
 
b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java
index 543212666e..654a89bc33 100644
--- 
a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java
+++ 
b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java
@@ -390,6 +390,7 @@ public class TestSnapshotDiffManager {
 
   @AfterEach
   public void tearDown() {
+    IOUtils.closeQuietly(snapshotDiffManager);
     if (columnFamilyHandles != null) {
       columnFamilyHandles.forEach(IOUtils::closeQuietly);
     }
@@ -397,7 +398,6 @@ public class TestSnapshotDiffManager {
     IOUtils.closeQuietly(db);
     IOUtils.closeQuietly(dbOptions);
     IOUtils.closeQuietly(columnFamilyOptions);
-    IOUtils.closeQuietly(snapshotDiffManager);
   }
 
   private OmSnapshot getMockedOmSnapshot(UUID snapshotId) {
@@ -674,8 +674,6 @@ public class TestSnapshotDiffManager {
       Table<String, ? extends WithParentObjectId> fromSnapshotTable =
           getMockedTable(fromSnapshotTableMap, snapshotTableName);
 
-      snapshotDiffManager = new SnapshotDiffManager(db, differ, ozoneManager,
-          snapDiffJobTable, snapDiffReportTable, columnFamilyOptions, 
codecRegistry);
       SnapshotDiffManager spy = spy(snapshotDiffManager);
 
       doAnswer(invocation -> {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to