diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2017-12-04 16:34:23 -0500 |
---|---|---|
committer | Sulabh Mahajan <sulabh.mahajan@mongodb.com> | 2017-12-07 11:35:17 +1100 |
commit | d8f244717b6338063e0c20628bfa4bb65a821e0c (patch) | |
tree | 3adfbf20b7f3bb31ffc25650693634dbdf6460db /lang | |
parent | dcc86acdc9d579e5ce45e4e983a63e89437585ac (diff) | |
download | mongodb-3.6.1.tar.gz |
WT-3776 Cursor remove operation unpins page too early (#3825)mongodb-3.6.1
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 2ac616e61fac1c0e71b47e5d7633c6fbf518fb2f)
Diffstat (limited to 'lang')
0 files changed, 0 insertions, 0 deletions