Skip to content

Fix data corruption on CP persistence inconsistency#452

Draft
koujl wants to merge 2 commits into
eBay:stable/v4.xfrom
koujl:recommit
Draft

Fix data corruption on CP persistence inconsistency#452
koujl wants to merge 2 commits into
eBay:stable/v4.xfrom
koujl:recommit

Conversation

@koujl

@koujl koujl commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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

During BR the IndexSvc journal and the AppendBlkAllocator CP superblock are flushed in parallel with no atomicity guarantee. If the process crashes after the index entry is durable but before the allocator superblock is written, the receiver resumes with the blk_id visible in the index but the allocator watermarks reset. The dedup skip path then bypasses commit_blk entirely, leaving the blocks silently available for reallocation by subsequent blob writes and corrupting the data on disk.

The fix re-commits the blk_id recovered from the index entry so the allocator watermarks are restored before new allocations proceed.

Related PR: eBay/HomeStore#896


Also fixes a bug from #435 (https://jirap.corp.ebay.com/browse/SDSTOR-23162)

koujl added 2 commits July 14, 2026 11:46
During BR the IndexSvc journal and the AppendBlkAllocator CP superblock
are flushed in parallel with no atomicity guarantee. If the process
crashes after the index entry is durable but before the allocator
superblock is written, the receiver resumes with the blk_id visible in
the index but the allocator watermarks reset. The dedup skip path then
bypasses commit_blk entirely, leaving the blocks silently available for
reallocation by subsequent blob writes and corrupting the data on disk.

The fix re-commits the blk_id recovered from the index entry so
the allocator watermarks are restored before new allocations proceed.
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