Skip to content

test: cover multi-level compaction and deep-level deletes#28

Merged
predatorray merged 1 commit into
mainfrom
claude/memtable-compaction-tests-3ab3bq
Jun 19, 2026
Merged

test: cover multi-level compaction and deep-level deletes#28
predatorray merged 1 commit into
mainfrom
claude/memtable-compaction-tests-3ab3bq

Conversation

@predatorray

Copy link
Copy Markdown
Owner

Existing tests only exercised the memtable -> L0 (flush) hop and a single
L0 -> L1 compaction; there was no coverage for an entry cascading to L1/L2
through compaction while staying readable, nor for deleting a key whose
value lives on a non-memtable level.

  • BoxEngineCompactionTest (unit): drives BoxEngine.applyCompaction with a
    Compactor so an entry travels memtable -> L0 -> L1 -> L2 and stays
    readable via get/head/list/range; verifies LWW when an older version sits
    on a deep level; and covers a DELETE against a key on a deep level
    shadowing it across the merged read path and being reconciled away by a
    bottommost compaction (both the aged-drop and young-keep tombstone cases).
  • MultiLevelCompactionIT: the same level-hierarchy and deep-delete
    reconciliation on real BookKeeper + ZooKeeper, followed by GC reclaiming
    the obsoleted ledgers while surviving data stays intact.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01YJbv5czMPv67CgywvtNFA9

Existing tests only exercised the memtable -> L0 (flush) hop and a single
L0 -> L1 compaction; there was no coverage for an entry cascading to L1/L2
through compaction while staying readable, nor for deleting a key whose
value lives on a non-memtable level.

- BoxEngineCompactionTest (unit): drives BoxEngine.applyCompaction with a
  Compactor so an entry travels memtable -> L0 -> L1 -> L2 and stays
  readable via get/head/list/range; verifies LWW when an older version sits
  on a deep level; and covers a DELETE against a key on a deep level
  shadowing it across the merged read path and being reconciled away by a
  bottommost compaction (both the aged-drop and young-keep tombstone cases).
- MultiLevelCompactionIT: the same level-hierarchy and deep-delete
  reconciliation on real BookKeeper + ZooKeeper, followed by GC reclaiming
  the obsoleted ledgers while surviving data stays intact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJbv5czMPv67CgywvtNFA9
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

✅ S3 compatibility gate passed

  • mode: gate
  • result: 192 passed in 90.39s (0:01:30)

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.66%. Comparing base (d918879) to head (29e3566).

Additional details and impacted files
@@            Coverage Diff            @@
##               main      #28   +/-   ##
=========================================
  Coverage     83.66%   83.66%           
  Complexity      677      677           
=========================================
  Files           161      161           
  Lines          8876     8876           
  Branches       1330     1330           
=========================================
  Hits           7426     7426           
  Misses          970      970           
  Partials        480      480           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@predatorray predatorray merged commit b49bd37 into main Jun 19, 2026
9 of 10 checks passed
@predatorray predatorray deleted the claude/memtable-compaction-tests-3ab3bq branch June 19, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants