SaketaChalamchala commented on code in PR #10363:
URL: https://github.com/apache/ozone/pull/10363#discussion_r3321116654
##########
hadoop-hdds/rocksdb-checkpoint-differ/src/test/java/org/apache/ozone/rocksdiff/TestRocksDBCheckpointDiffer.java:
##########
@@ -984,20 +989,23 @@ void testDifferWithDB() throws Exception {
diffAllSnapshots(rocksDBCheckpointDiffer);
- // Confirm correct links created
+ // SST backup hard-links use whatever file numbers RocksDB assigns for
compaction inputs.
try (Stream<Path> sstPathStream = Files.list(sstBackUpDir.toPath())) {
- List<String> expectedLinks = sstPathStream.map(Path::getFileName)
- .map(Object::toString).sorted().collect(Collectors.toList());
- assertEquals(expectedLinks, asList(
- "000017.sst", "000019.sst", "000021.sst", "000023.sst",
- "000024.sst", "000026.sst", "000029.sst"));
+ List<String> backupFiles =
+ sstPathStream.map(p ->
p.getFileName().toString()).sorted().collect(Collectors.toList());
+ assertEquals(7, backupFiles.size(), "Unexpected compaction SST backup
count");
Review Comment:
Asserting the count here may still be flaky depending on how RocksDB
compacts on different platforms. A more concrete check can be
- Get the diff SST files between the last snapshot and the first snapshot
using `differ.getSSTDiffList()`. (The correctness of `getSSTDiffList()` should
already be verified in `diffAllSnapshots()`. See comment below)
- Check whether these diff list of files are in the last snapshot.
- Otherwise they should be in SST backup directory (they should not be
pruned as they will correspond to the leaf node in the compaction DAG).
--
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]