smengcl commented on code in PR #3981:
URL: https://github.com/apache/ozone/pull/3981#discussion_r1035314554
##########
hadoop-hdds/rocksdb-checkpoint-differ/src/test/java/org/apache/ozone/rocksdiff/TestRocksDBCheckpointDiffer.java:
##########
@@ -90,8 +97,141 @@ public static void init() {
GenericTestUtils.setLogLevel(TestRocksDBCheckpointDiffer.LOG, Level.INFO);
}
+ /**
+ * Tests core SST diff list logic. Does not involve DB.
+ * Focuses on testing edge cases in internalGetSSTDiffList().
+ */
@Test
- void testMain() throws Exception {
+ void testGetSSTDiffListWithoutDB() {
+
+ RocksDBCheckpointDiffer differ = new RocksDBCheckpointDiffer();
+
+ // Construct DAG from compaction log input
+ final String compactionLog1 = ""
+ + "S 1000 df6410c7-151b-4e90-870e-5ef12875acd5\n" // Snapshot 0
+ + "C 000001,000002:000062\n"
+ // Additional "compaction" to trigger and test early exit condition
+ + "S 3008 ef6410c7-151b-4e90-870e-5ef12875acd5\n" // Snapshot 1
+ + "C 000068,000062:000069\n" // Regular compaction
+ + "C 000071,000064,000060,000052:000071,000064,000060,000052\n"
Review Comment:
Ah. This is what RocksDB calls "Trivial move":
https://github.com/facebook/rocksdb/wiki/Compaction-Trivial-Move
I left a comment in the line just below this.
--
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]