-
Notifications
You must be signed in to change notification settings - Fork 379
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
WT-12178: bug fix, __wt_block_extlist_merge has potential risks #10015
WT-12178: bug fix, __wt_block_extlist_merge has potential risks #10015
Conversation
Record how many pages we want and how many pages we have queued so far in a tree, then resume the walk next iteration. This avoids a single tree with a target larger than the queue size being walked completely before the eviction server moves on to the next tree. (cherry picked from commit fca6a8d)
…s. (wiredtiger#3826) (cherry picked from commit 2f489ea)
There's trickiness in the page-pinned check. By definition a remove operation leaves a cursor positioned if it's initially positioned. However, if every item on the page is deleted and we unpin the page, eviction might delete the page and our search will re-instantiate an empty page for us. Cursor remove returns not-found whether or not that eviction/deletion happens and it's OK unless cursor-overwrite is configured (which means we return success even if there's no item to delete). In that case, we'll fail when we try to point the cursor at the key on the page to satisfy the positioned requirement. It's arguably safe to simply leave the key initialized in the cursor (as that's all a positioned cursor implies), but it's probably safer to avoid page eviction entirely in the positioned case. (cherry picked from commit 2ac616e)
…dtiger#4017) This reverts commit 565496e.
(cherry picked from commit 9ba3e90)
Hi @y123456yz, thank you for your submission! |
@y123456yz I don't think this is broken, risky, or worth fixing sorry. Merging extent lists is an operation that we expect to alter the extent lists that we pass in. Even if we wanted to make this change, I don't think it's useful to mark fields of a structure with |
__wt_block_extlist_merge has potential risks.
in function __wt_block_extlist_merge, We switched a and b,this may leads to the following potential risks:
in PR: #9896
https://github.com/y123456yz/wiredtiger/blob/develop_WT_EXTLIST_last_bug_fix/src/block/block_ext.c#L955-L956
Because of this problem, some unit test run failed, it took me a lot of time to locate. So it's worth adding some comments and WT_UNUSED here.