feat: Reverse block counts

db/4201/compaction-bugs
devanbenz 2025-01-14 12:36:14 -06:00
parent 0a2ba1ec3f
commit 8c908c547b
1 changed files with 12 additions and 0 deletions

View File

@ -2645,6 +2645,12 @@ func TestDefaultPlanner_PlanOptimize_Test(t *testing.T) {
// Reverse test files and re-run tests
slices.Reverse(test.fs)
if len(test.bc) > 0 {
slices.Reverse(test.bc)
err := ffs.SetBlockCounts(test.bc)
require.NoError(t, err, "setting reverse block counts")
}
cp = tsm1.NewDefaultPlanner(ffs, tsdb.DefaultCompactFullWriteColdDuration)
expectedNotFullyCompacted(cp, test.expectedFullyCompactedReasonExp, test.expectedgenerationCount)
})
@ -2771,6 +2777,12 @@ func TestDefaultPlanner_PlanOptimize_Test(t *testing.T) {
// Reverse test files and re-run tests
slices.Reverse(test.fs)
if len(test.bc) > 0 {
slices.Reverse(test.bc)
err := ffs.SetBlockCounts(test.bc)
require.NoError(t, err, "setting reverse block counts")
}
cp = tsm1.NewDefaultPlanner(ffs, tsdb.DefaultCompactFullWriteColdDuration)
expectedFullyCompacted(cp, test.expectedFullyCompactedReasonExp)
})