Skip to content

Fix BlkReadTracker firing waiter callback under hashmap write lock. - #899

Open
Besroy wants to merge 1 commit into
eBay:stable/v7.xfrom
Besroy:fix_blk_read_tracker
Open

Fix BlkReadTracker firing waiter callback under hashmap write lock.#899
Besroy wants to merge 1 commit into
eBay:stable/v7.xfrom
Besroy:fix_blk_read_tracker

Conversation

@Besroy

@Besroy Besroy commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Move waiters out of the record before delete so m_cb() runs after the lock is released, avoiding deadlock when the callback requires other resources. Add a regression test to verify the fix.

@codecov-commenter

codecov-commenter commented Jul 17, 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 66.66667% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (stable/v7.x@7c1d614). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/lib/blkdata_svc/blk_read_tracker.cpp 66.66% 0 Missing and 2 partials ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@              Coverage Diff               @@
##             stable/v7.x     #899   +/-   ##
==============================================
  Coverage               ?   48.32%           
==============================================
  Files                  ?      110           
  Lines                  ?    13119           
  Branches               ?     6325           
==============================================
  Hits                   ?     6340           
  Misses                 ?     2548           
  Partials               ?     4231           

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

JacksonYao287
JacksonYao287 previously approved these changes Jul 19, 2026

@JacksonYao287 JacksonYao287 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Root cause analysis LGTM. Moving m_waiters out before delete n ensures ~blk_track_waiter / m_cb() runs after the bucket unique_lock is released。

Move waiters out of the record before delete so m_cb() runs after the
lock is released, avoiding deadlock when the callback requires other resources.
Add a regression test to verify the fix.

@JacksonYao287 JacksonYao287 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Besroy

Besroy commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

This PR uses folly::xxx; let's put it on hold for now and decide whether to merge it after the folly migration done.

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