Skip to content

[SDSTOR-23023] Add force_cache option to commit_blk for post-crash resync#896

Open
koujl wants to merge 1 commit into
eBay:stable/v7.xfrom
koujl:recommit
Open

[SDSTOR-23023] Add force_cache option to commit_blk for post-crash resync#896
koujl wants to merge 1 commit into
eBay:stable/v7.xfrom
koujl:recommit

Conversation

@koujl

@koujl koujl commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

https://jirap.corp.ebay.com/browse/SDSTOR-23023

Normally commit_blk is called either during recovery (which advances both watermarks) or after a fresh alloc. However, in some scenarios, a blk_id may be recorded to be live by the caller but the allocator watermarks have not been successfully persisted.

The new force_cache parameter allows the caller to unconditionally advance both m_last_append_offset and m_commit_offset, covering such cases without requiring the system to be in initialising mode.

Related PR: eBay/HomeObject#452

@codecov-commenter

codecov-commenter commented Jul 13, 2026

Copy link
Copy Markdown

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

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (stable/v7.x@20df560). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/lib/blkdata_svc/blkdata_service.cpp 33.33% 1 Missing and 1 partial ⚠️
src/lib/device/virtual_dev.cpp 66.66% 0 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@              Coverage Diff               @@
##             stable/v7.x     #896   +/-   ##
==============================================
  Coverage               ?   48.18%           
==============================================
  Files                  ?      110           
  Lines                  ?    12964           
  Branches               ?     6229           
==============================================
  Hits                   ?     6247           
  Misses                 ?     2583           
  Partials               ?     4134           

☔ 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.

Normally commit_blk is called either during recovery (which advances
both watermarks) or after a fresh alloc. However, in some scenarios, a
blk_id may be recorded to be live by the caller but the allocator
watermarks have not been successfully persisted. The new `force_cache`
parameter allows the caller to unconditionally advance both
m_last_append_offset and m_commit_offset, covering such cases without
requiring the system to be in initialising mode.

Signed-off-by: Kou, Jilong <jkou@ebay.com>

@Besroy Besroy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the fix

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