fix test in InnerUnseqCompactionWithReadPointPerformerTest #16735
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix Non-Deterministic Behavior in InnerUnseqCompactionWithReadPointPerformerTest
Problem
InnerUnseqCompactionWithReadPointPerformerTest.testwas failing non-deterministically under NonDex with 100% failure rate (10/10 runs) due to reliance on HashMap/HashSet iteration order in test setup and file generation.Way to Reproduce
Root Cause
Multiple HashMap/HashSet usages caused non-deterministic iteration order:
chunkPagePointsNumMerged): HashMap iteration affected assertion orderfullPath): HashSet iteration determined TsFile write ordertoDeleteTimeseriesAndTime): HashMap affected deletion orderingCompactionFileGeneratorUtils: HashMap caused non-deterministic device ordering in generated TsFilesWhen NonDex shuffled collection order, measurements/devices were written in different sequences, causing expected chunk/page point counts to mismatch actual values.
Solution
InnerUnseqCompactionWithReadPointPerformerTest.java:
Set<String> fullPathfrom HashSet to LinkedHashSet (line 130)toDeleteTimeseriesAndTimemaps from HashMap to LinkedHashMap (lines 313, 356)chunkPagePointsNumMergedfrom HashMap to LinkedHashMap (line 383)CompactionFileGeneratorUtils.java:
deviceMeasurementMapfrom HashMap to LinkedHashMap inwriteChunkToTsFileWithTimeRange()methodVerification
Key changed classes:
InnerUnseqCompactionWithReadPointPerformerTest(test changes only)CompactionFileGeneratorUtils(test utility changes only)