]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix MPOOL_IGNOREPIN to ease btree debugging
authorTom Yu <tlyu@mit.edu>
Mon, 8 Aug 2016 13:06:16 +0000 (09:06 -0400)
committerTom Yu <tlyu@mit.edu>
Tue, 16 Aug 2016 19:24:56 +0000 (15:24 -0400)
commite6b4a19a546e0a171a416261cb06dfcc8e607e7b
tree85a6056b1a572b0546643f254d96a55db4e14f81
parent84992bd7a9e1fd2f6b332d054aef9c8dfea84742
Fix MPOOL_IGNOREPIN to ease btree debugging

Various libdb2 test programs use the MPOOL_IGNOREPIN flag to examine
arbitrary mpool pages that may or may not be pinned.  This flag is
apparently intended to allow fetching pages that are already pinned,
and to avoid setting the MPOOL_PINNED flag.  When there was a cache
hit, mpool_get was setting MPOOL_PINNED anyway, causing aborts when
using debugging programs such as dbtest and bttest.

Fix this inconsistency by not setting MPOOL_PINNED when returning a
cached page when the caller requested MPOOL_IGNOREPIN.  In bttest, add
MPOOL_IGNOREPIN to allow dumping of pages while they are pinned
without disrupting their pinned status.

ticket: 8478
src/plugins/kdb/db2/libdb2/mpool/mpool.c
src/plugins/kdb/db2/libdb2/test/btree.tests/main.c