From 52a12cd562a03333007e61fdcdec2df249d47f00 Mon Sep 17 00:00:00 2001 From: Bilal Akhtar Date: Fri, 7 Jul 2023 16:30:59 -0400 Subject: [PATCH] internal/manifest: delete L0Sublevels_LargeImport Previously we had skipped the L0Sublevels_LargeImport test as it was not well-written and buggy. On closer inspection it does not provide any net new test coverage and is just a sanity test with loading a large manifest and picking some compactions in a row, something that will happen with metamorphic test runs too. Plus, the same manifest is already loaded in some benchmarks. Fixing the test added 60+ seconds to the runtime of the whole test suite. This change deletes this test. --- internal/manifest/l0_sublevels_test.go | 50 -------------------------- 1 file changed, 50 deletions(-) diff --git a/internal/manifest/l0_sublevels_test.go b/internal/manifest/l0_sublevels_test.go index 0836ea701c..a9e929ba54 100644 --- a/internal/manifest/l0_sublevels_test.go +++ b/internal/manifest/l0_sublevels_test.go @@ -57,56 +57,6 @@ func readManifest(filename string) (*Version, error) { return v, nil } -func TestL0Sublevels_LargeImportL0(t *testing.T) { - t.Skip("#2710") - v, err := readManifest("testdata/MANIFEST_import") - require.NoError(t, err) - - sublevels, err := NewL0Sublevels(&v.Levels[0], - base.DefaultComparer.Compare, base.DefaultFormatter, 5<<20) - require.NoError(t, err) - fmt.Printf("L0Sublevels:\n%s\n\n", sublevels) - - for i := 0; ; i++ { - c, err := sublevels.PickBaseCompaction(2, LevelSlice{}) - require.NoError(t, err) - if c == nil { - break - } - fmt.Printf("%d: base compaction: filecount: %d, bytes: %d, interval: [%d, %d], seed depth: %d\n", - i, len(c.Files), c.fileBytes, c.minIntervalIndex, c.maxIntervalIndex, c.seedIntervalStackDepthReduction) - var files []*FileMetadata - for i := range c.Files { - if c.FilesIncluded[i] { - c.Files[i].CompactionState = CompactionStateCompacting - files = append(files, c.Files[i]) - } - } - require.NoError(t, sublevels.UpdateStateForStartedCompaction( - []LevelSlice{NewLevelSliceSeqSorted(files)}, true)) - } - - for i := 0; ; i++ { - c, err := sublevels.PickIntraL0Compaction(math.MaxUint64, 2) - require.NoError(t, err) - if c == nil { - break - } - fmt.Printf("%d: intra-L0 compaction: filecount: %d, bytes: %d, interval: [%d, %d], seed depth: %d\n", - i, len(c.Files), c.fileBytes, c.minIntervalIndex, c.maxIntervalIndex, c.seedIntervalStackDepthReduction) - var files []*FileMetadata - for i := range c.Files { - if c.FilesIncluded[i] { - c.Files[i].CompactionState = CompactionStateCompacting - c.Files[i].IsIntraL0Compacting = true - files = append(files, c.Files[i]) - } - } - require.NoError(t, sublevels.UpdateStateForStartedCompaction( - []LevelSlice{NewLevelSliceSeqSorted(files)}, false)) - } -} - func visualizeSublevels( s *L0Sublevels, compactionFiles bitSet, otherLevels [][]*FileMetadata, ) string {