-
Notifications
You must be signed in to change notification settings - Fork 24
Issue 713: Fix index table destroy race with wb_cache cp flush #714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| auto cpg = cp_mgr().cp_guard(); | ||
| Btree< K, V >::destroy_btree(cpg.context(cp_consumer_t::INDEX_SVC)); | ||
| m_sb.destroy(); | ||
| m_sb_buffer->m_valid = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
online this change in this file
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #714 +/- ##
===========================================
+ Coverage 56.51% 66.85% +10.33%
===========================================
Files 108 109 +1
Lines 10300 11946 +1646
Branches 1402 1666 +264
===========================================
+ Hits 5821 7986 +2165
+ Misses 3894 3126 -768
- Partials 585 834 +249 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| auto const& sb = r_cast< MetaIndexBuffer* >(buf.get())->m_sb; | ||
| if (!sb.is_empty()) { meta_service().update_sub_sb(buf->m_bytes, sb.size(), sb.meta_blk()); } | ||
| auto const sb_buf = r_cast< MetaIndexBuffer* >(buf.get()); | ||
| if (sb_buf->m_valid) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should ideally assert, so may be add a todo. After the btree fix, we can add assert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the purpose here for the check is to avoid flushing some m_sb that is destroyed before cp arrives. e.g. it should be fine that when cp arrives, the related dirty sb has been destroyed, right? Alternatively when it is being destroyed, we can have cp consumer to remove it from dirty list (CP has to provide such api though), however that seems to be unnecessary, imo.
To reviewers:
Please kindly change setting hide whitespace and reload, a recent PR seems didn't apply clang-format on a few files.
There is only one line change in
index_table.hppwhich I commented in the PR.Passed test against HomeStore consumer HomeObject.