More for #5860 - if the cache blew past the maxsize, bring it all the way

back down to size.
This commit is contained in:
Howard Chu 2009-03-18 18:18:40 +00:00
parent 0121f8c01d
commit 65c24bdb1f

View File

@ -674,8 +674,12 @@ bdb_cache_lru_purge( struct bdb_info *bdb )
else
eimax = bdb->bi_cache.c_eimax;
if ( bdb->bi_cache.c_cursize > bdb->bi_cache.c_maxsize )
efree = bdb->bi_cache.c_cursize - bdb->bi_cache.c_maxsize;
if ( efree < 1 )
efree = 0;
else if (efree < bdb->bi_cache.c_minfree )
efree = bdb->bi_cache.c_minfree;
if ( bdb->bi_cache.c_leaves > eimax ) {
eifree = bdb->bi_cache.c_minfree * 10;
if ( eifree >= eimax )