mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
More for #5860 - if the cache blew past the maxsize, bring it all the way
back down to size.
This commit is contained in:
parent
0121f8c01d
commit
65c24bdb1f
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user