summaryrefslogtreecommitdiff
path: root/api/leveldb
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2016-03-06 13:52:23 -0500
committerKeith Bostic <keith@wiredtiger.com>2016-03-06 13:52:23 -0500
commit45ffd7785f27d2cefc429f8edbeb1d0db1901796 (patch)
treeb427de8b5141c3bc3fdbc3966f2756b88db2a57b /api/leveldb
parentf91fbe07e483c8fae5159c6036d4caa181777b2a (diff)
downloadmongo-45ffd7785f27d2cefc429f8edbeb1d0db1901796.tar.gz
WT-2391: De-prioritize eviction from indexes
With commit 7f84e3b it's unlikely for a page to NOT have a read generation, it only happens if a reader configured with WT_READ_NO_GEN set were to read a page into cache, and that won't happen because those readers set either WT_READ_CACHE or WT_READ_WONT_NEED. The eviction code still has special code to handle pages without a read generation set, and it maintains a "oldest page generation" value to support that. However, the oldest page generation value isn't really right -- it's simply that page generation value from the first slot in the queue, which can be special (for example, if the page generation was set to WT_READGEN_OLDEST because the page was empty). Add a test in the page-read code to set the page generation if it's never been set, regardless of WT_READ_NO_GEN. Remove the eviction code to maintain an "oldest page generation". Leave the eviction code to handle WT_READGEN_NOTSET (it can still see that value if there's a race), but change it to set the page read generation to the "standard" value instead of trying anything fancy. That ensure that if there's a bug (we read the page but for some reason never set the page generation), the page won't stay in that state forever.
Diffstat (limited to 'api/leveldb')
0 files changed, 0 insertions, 0 deletions