Merge pull request #1269 from urbit/cc-lmdb-map-size

Use a 40 gigabyte log size
This commit is contained in:
Elliot Glaysher 2019-05-02 11:51:34 -07:00 committed by GitHub
commit 17bbe52524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,9 +41,11 @@ MDB_env* u3_lmdb_init(const char* log_path)
return 0;
}
// TODO: Start with a gigabyte for the event log.
// TODO: Start with forty gigabytes for the maximum event log size. We'll
// need to do something more sophisticated for real in the long term, though.
//
ret_w = mdb_env_set_mapsize(env, 1024 * 1024 * 1024);
const size_t forty_gigabytes = 42949672960;
ret_w = mdb_env_set_mapsize(env, forty_gigabytes);
if (ret_w != 0) {
u3l_log("lmdb: failed to set database size: %s\n", mdb_strerror(ret_w));
return 0;