cockroachdb / pebble

RocksDB/LevelDB inspired key-value database in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

metamorphic: CopySpan cannot copy an empty span

RaduBerinde opened this issue · comments

Ran into this one. This is proof that we can end up with an empty external virtual table even if we never ingest an empty one (CC @dt @msbutler @itsbilal).

Reduced to:

Init(0 /* dbs */, 44 /* batches */, 63 /* iters */, 47 /* snapshots */, 2 /* externalObjs */)
batch2 = db1.NewBatch()
batch2.SingleDelete("wxpaj", false /* maybeReplaceDelete */)
external0 = batch2.NewExternalObj()
db1.IngestExternalFiles(external0, "finbmymshriyq" /* start */, "fwxpajbq" /* end */, "@70" /* syntheticSuffix */, "f" /* syntheticPrefix */)
batch11 = db1.NewBatch()
batch11.LogData("brrsrtnzgi")
db1.IngestAndExcise(batch11, "fpcd", "fsnunflbgf", true /* sstContainsExciseTombstone */)
db1.Download("ardbgnafsbo@3" /* start */, "omxtb@64" /* end */, true /* viaBackingFileDownload */, "bcqeqlp" /* start */, "mkfje@31" /* end */, false /* viaBackingFileDownload */)
[TestOptions]
  replace_single_delete=true
  threads=1
  disable_value_blocks_for_ingest_sstables=true
  external_storage_enabled=true
  seed_efos=4020466255439717488
  ingest_split=true
  use_excise=true

Note that IngestAndExcise here ingests a batch that has just the DeleteRange and RangeKeyDelete.

The cause is CopySpan ignoring the synthetic suffix.