Skip to content

Test subtree-to-inline storage conversion in multimap removal#1256

Merged
cberner merged 1 commit into
masterfrom
claude/improve-api-coverage-OjbKK
May 14, 2026
Merged

Test subtree-to-inline storage conversion in multimap removal#1256
cberner merged 1 commit into
masterfrom
claude/improve-api-coverage-OjbKK

Conversation

@cberner
Copy link
Copy Markdown
Owner

@cberner cberner commented May 14, 2026

Summary

Extends the multimap_remove_subtree_backed_key test to verify that B-tree subtree storage is correctly converted back to inline storage when removals shrink the data below the threshold.

Changes

  • Enhanced test coverage: Added a new test section that removes almost all values from a key that was previously stored in subtree (B-tree) format, verifying the storage conversion path
  • Updated test documentation: Clarified the test's purpose to include coverage of the subtree-to-inline shrinking behavior
  • Verification assertions: Added checks to confirm:
    • The subtree correctly shrinks to a single remaining value
    • The total table length is correct after removals
    • The remaining value is correctly accessible after the storage conversion

Implementation Details

The new test section removes 998 out of 999 values for key 0 (keeping only value 500), which causes the B-tree subtree to shrink below the page-size threshold and triggers automatic conversion back to inline storage. This ensures the multimap implementation correctly handles the transition between storage formats during the removal process.

https://claude.ai/code/session_01FPYFdGyznM7nMorDiAK5A2

Extend multimap_remove_subtree_backed_key to keep removing values from the
subtree-backed key until enough values are gone that the collection is
rewritten back to inline storage, exercising the previously-untested LEAF
branch of MultimapTable::remove() and the collapse threshold.

Assisted-by: Claude <noreply@anthropic.com>
@cberner cberner force-pushed the claude/improve-api-coverage-OjbKK branch from f866f3e to 992b256 Compare May 14, 2026 01:33
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.50%. Comparing base (25d2db0) to head (992b256).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1256      +/-   ##
==========================================
+ Coverage   88.34%   88.50%   +0.16%     
==========================================
  Files          36       36              
  Lines       14848    14848              
==========================================
+ Hits        13117    13141      +24     
+ Misses       1731     1707      -24     

see 2 files with indirect coverage changes

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

@cberner cberner merged commit 0c7fc3c into master May 14, 2026
8 checks passed
@cberner cberner deleted the claude/improve-api-coverage-OjbKK branch May 14, 2026 01:43
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.

1 participant