-
Notifications
You must be signed in to change notification settings - Fork 21
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
Avoid flushing on wbcache non dirty buffers in merge case #293
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #293 +/- ##
==========================================
- Coverage 62.60% 59.71% -2.89%
==========================================
Files 110 110
Lines 8990 9115 +125
Branches 1156 1173 +17
==========================================
- Hits 5628 5443 -185
- Misses 2829 3138 +309
- Partials 533 534 +1 ☔ View full report in Codecov by Sentry. |
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.
LG
In merge case, if merge not required and prep txn already called, parent wont be dirty adn we flush the cache causing invalid dirty buffer count. Concurrent thread iterators can't be reused.
Issue
[resource_mgr.cpp:39] ******************** Assertion failure: =====> Expected '-4096' to be >= to '0'
Fix
In merge case, even if merge is required, we call prepare txn and connect the left and parent. But during merge, we find merge is not required. The child node is modified but its next point to parent which is not modified or dirty. The child node is added to dirty list. Now during flushing, after child flush, it goes to next parent buffer and flushes that too even if its not dirty. This causes mismatch in m_hs_dirty_buf_cnt. Any buffer needs to flush should go through write_buf(). Its too complicated to unwind the prepare_txn in merge. Instead if the parent is not dirty ignore while flushing.
In merge case, if merge not required and prep txn already called, parent wont be dirty and we flush the cache causing invalid dirty buffer count. Concurrent insert vector iterators can't be reused.
./bin/test_index_btree --num_entries=500000
500k entries
[==========] 36 tests from 8 test suites ran. (11957416 ms total)
[ PASSED ] 36 tests