From dc7f2530dd0fca5f9030e1d457306674f6cd6966 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 18 Jun 2014 09:07:39 -0700 Subject: [PATCH] Tweak prev patch for ovpage search --- libraries/liblmdb/mdb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index c48fb28..734b63a 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -1779,10 +1779,6 @@ mdb_page_dirty(MDB_txn *txn, MDB_page *mp) static int mdb_page_alloc(MDB_cursor *mc, int num, MDB_page **mp) { -/* use PARANOID for now, default infinite search slows down too much - * when the freelist is large - */ -#define MDB_PARANOID #ifdef MDB_PARANOID /* Seems like we can ignore this now */ /* Get at most more freeDB records once me_pghead * has enough pages. If not enough, use new pages from the map. @@ -1827,7 +1823,7 @@ mdb_page_alloc(MDB_cursor *mc, int num, MDB_page **mp) if (mop[i-n2] == pgno+n2) goto search_done; } while (--i > n2); - if (Max_retries < INT_MAX && --retry < 0) + if (--retry < 0) break; }