SDSTOR-21863: Revert AppendBlkAllocator Reset logic#886
Conversation
There was a problem hiding this comment.
Pull request overview
This PR changes AppendBlkAllocator reset behavior to reset in-place (instead of destroy + recreate) to eliminate a race between reset_block_allocator() and concurrent operations (cp_flush, free) as described in HomeObject issue #401.
Changes:
- Make
AppendBlkAllocator::reset()an in-place reset that preserves the superblock/handler and reinitializes in-memory counters. - Skip creating a new allocator instance for append allocators during chunk allocator reset in
VirtualDev::reset_chunk_blk_allocator(). - Update and extend prerelease data-service tests to cover the
free()-after-reset()-before-cp_flush()scenario. - Bump Conan package version to 7.5.9.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/tests/test_data_service.cpp |
Updates scenario descriptions and adds a new prerelease regression test for the reset/free/cp_flush race. |
src/lib/device/virtual_dev.cpp |
Skips allocator instance replacement for append allocators during chunk reset; minor comment cleanup in cp_flush. |
src/lib/blkalloc/append_blk_allocator.cpp |
Implements in-place reset logic for AppendBlkAllocator and simplifies is_blk_alloced_on_disk(). |
conanfile.py |
Increments the package version from 7.5.8 to 7.5.9. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## stable/v7.x #886 +/- ##
==============================================
Coverage ? 48.18%
==============================================
Files ? 110
Lines ? 12938
Branches ? 6219
==============================================
Hits ? 6234
Misses ? 2577
Partials ? 4127 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ondition between upper layer reset and self operation on it (cp_flush and free) Fix eBay/HomeObject#401 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2661a6e to
ceaba2c
Compare
to prevent race condition between upper layer reset and self operation on it (cp_flush and free)
Fix eBay/HomeObject#401