Skip to content

Commit

Permalink
internal/manifest: delete L0Sublevels_LargeImport
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
itsbilal committed Jul 10, 2023
1 parent 168079a commit 52a12cd
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions internal/manifest/l0_sublevels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 52a12cd

Please sign in to comment.