hemantk-12 commented on code in PR #4697:
URL: https://github.com/apache/ozone/pull/4697#discussion_r1195736510


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java:
##########
@@ -916,15 +918,31 @@ public void testUniqueSnapshotId()
   public void testSnapshotOpensWithDisabledAutoCompaction() throws Exception {
     String snapPrefix = createSnapshot(volumeName, bucketName);
     RDBStore snapshotDBStore = (RDBStore)
-            ((OmSnapshot)cluster.getOzoneManager().getOmSnapshotManager()
+        ((OmSnapshot)cluster.getOzoneManager().getOmSnapshotManager()
             .checkForSnapshot(volumeName, bucketName, snapPrefix))
             .getMetadataManager().getStore();
 
     for (String table : snapshotDBStore.getTableNames().values()) {
       Assertions.assertTrue(snapshotDBStore.getDb().getColumnFamily(table)
-              .getHandle().getDescriptor()
-              .getOptions().disableAutoCompactions());
+          .getHandle().getDescriptor()
+          .getOptions().disableAutoCompactions());
     }
   }
 
+  @Test
+  public void testCompactionDagDisableForSnapshotMetadata() throws Exception {
+    String snapshotName = createSnapshot(volumeName, bucketName);
+
+    // RocksDBCheckpointDiffer should be not null for active store metadata.
+    assertNotNull(cluster.getOzoneManager().getMetadataManager().getStore()
+        .getRocksDBCheckpointDiffer());
+
+    OmSnapshot omSnapshot = (OmSnapshot) cluster.getOzoneManager()
+        .getOmSnapshotManager()
+        .checkForSnapshot(volumeName, bucketName, snapshotName);
+
+    // RocksDBCheckpointDiffer should be null for snapshot metadata.
+    assertNull(omSnapshot.getMetadataManager().getStore()

Review Comment:
   Updated source and test code to assert listener attached to `DBOptions`.



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