arunsarin85 opened a new pull request, #10235:
URL: https://github.com/apache/ozone/pull/10235

   ## What changes were proposed in this pull request?
   This PR adds a new integration test class,TestOmSnapshotCheckpointDbContent. 
It builds a small MiniOzone cluster, writes keys for OBJECT_STORE, 
FILE_SYSTEM_OPTIMIZED, and LEGACY buckets, creates a snapshot, waits for the 
on-disk checkpoint to appear, opens that checkpoint read-only, and compares 
bucket-scoped rows between the live OM metadata manager and the checkpoint for 
the tables the test covers.
   
   Please describe your PR in detail:
   Snapshot correctness depends on the OM checkpoint on disk reflecting the 
same bucket metadata as the active OM for the data paths clients care about. 
   
   For each bucket layout, the flow is: create a volume and bucket, write a few 
keys, call createSnapshot, load SnapshotInfo from the live OM, wait until the 
checkpoint CURRENT file exists, open the checkpoint with RocksDBCheckpoint and 
OmMetadataManagerImpl.createCheckpointMetadataManager, then scan matching key 
prefixes on both sides.
   
   Compared tables include volume and bucket rows, the key table for object 
store and legacy layouts, file and directory tables for FSO.
   
   The new snapshot row in snapshotInfoTable commits in the same batch as the 
checkpoint step, so it appears on the live OM after commit but not inside the 
checkpoint taken mid-batch. After the checkpoint, OM also scrubs deleted and 
snapshot-renamed prefix ranges on the active DB, so live and checkpoint diverge 
there on purpose. Those tables are not part of the equality check.
   
   Three datanodes for RATIS/THREE, snapshot defrag disabled for stability, and 
a null check on SnapshotInfo for clearer failures.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-13217
   
   ## How was this patch tested?
   
   Locally with Maven, scoped to the new class:
   
   mvn -pl hadoop-ozone/integration-test 
-Dtest=TestOmSnapshotCheckpointDbContent -DfailIfNoTests=false test
   <img width="790" height="275" alt="image" 
src="https://github.com/user-attachments/assets/9e89cff6-02c5-4297-8262-0a14487c3a09";
 />


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