Skip to content

Check is_blk_alloced and use free_blk_now during log replay.#144

Merged
sanebay merged 1 commit intoeBay:mainfrom
sanebay:is_blk_alloc
Feb 4, 2026
Merged

Check is_blk_alloced and use free_blk_now during log replay.#144
sanebay merged 1 commit intoeBay:mainfrom
sanebay:is_blk_alloc

Conversation

@sanebay
Copy link
Contributor

@sanebay sanebay commented Oct 31, 2025

For same lba if there are multiple writes, we free the old blkid's. If those free blkid's are reused and freed again there will be multiple log entries. So during log replay check if they are alloced and if alloced directly
free the blk from blk allocator bitmap cache.
To reproduce the issue
test_volume_io --gtest_filter="VolumeIOTest.LongRunningRandomIO" --num_restarts=4 --num_vols=32 --write_num_io=300 --read_num_io=300 --dev_size_mb=1024000 --log_mods blkalloc:debug --run_time=300

@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.06%. Comparing base (0b40663) to head (e610df0).
⚠️ Report is 63 commits behind head on main.

Files with missing lines Patch % Lines
src/lib/volume_mgr.cpp 0.00% 2 Missing and 2 partials ⚠️
src/lib/listener.hpp 0.00% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #144       +/-   ##
===========================================
- Coverage   61.68%   47.06%   -14.63%     
===========================================
  Files          15       16        +1     
  Lines         462     1124      +662     
  Branches       35      539      +504     
===========================================
+ Hits          285      529      +244     
- Misses        158      226       +68     
- Partials       19      369      +350     

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Contributor

@shosseinimotlagh shosseinimotlagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one suggestion

For same lba if there are multiple writes, we free the old
blkid's. If those free blkid's are reused and freed again
there will be multiple log entries. So during log replay
check if they are alloced and if alloced directly
free the blk from blk allocator bitmap cache.
@sanebay sanebay merged commit b4f1ad4 into eBay:main Feb 4, 2026
19 checks passed
@sanebay sanebay deleted the is_blk_alloc branch February 4, 2026 20:59
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.

3 participants