wiredtiger/wiredtiger.github.com — Issue #38: cache_size is overflowing
Author: wiredtiger
Created: 2012-01-31 15:06:58+00:00
State: open

The old internal API stores the cache size in MB, the new API stores it as bytes, so it's overflowing when it's being converted in the Btree code.

We should probably either go to a 64-bit cache size and use bytes, or the new API needs to store the cache size as MB, because 32-bits of bytes isn't a large enough maximum cache size.

I think the problem is the mismatch between this code:

@int
__wt_cache_create(CONNECTION *conn) {
WT_STAT_SET(
cache->stats, cache_bytes_max, conn->cache_size * WT_MEGABYTE);
@

and:

const char *
__wt_config_def_wiredtiger_open =
"cache_size=20MB,create=false,data_update_min=8KB,data_update_max=32KB,"
"exclusive=false,error_prefix=,hazard_size=15,logging=false,"
"session_max=50,multiprocess=false,verbose=";