OPTION(mon_sync_provider_kill_at, OPT_INT, 0) // kill the sync provider at a specific point in the work flow
OPTION(mon_sync_requester_kill_at, OPT_INT, 0) // kill the sync requester at a specific point in the work flow
-OPTION(mon_leveldb_write_buffer_size, OPT_U64, 32*1024*1024) // monitor's leveldb write buffer size
-OPTION(mon_leveldb_cache_size, OPT_U64, 512*1024*1024) // monitor's leveldb cache size
-OPTION(mon_leveldb_block_size, OPT_U64, 64*1024) // monitor's leveldb block size
-OPTION(mon_leveldb_bloom_size, OPT_INT, 0) // monitor's leveldb bloom bits per entry
-OPTION(mon_leveldb_max_open_files, OPT_INT, 0) // monitor's leveldb max open files
-OPTION(mon_leveldb_compression, OPT_BOOL, false) // monitor's leveldb uses compression
-OPTION(mon_leveldb_paranoid, OPT_BOOL, false) // monitor's leveldb paranoid flag
-OPTION(mon_leveldb_log, OPT_STR, "")
OPTION(mon_force_quorum_join, OPT_BOOL, false) // force monitor to join quorum even if it has been previously removed from the map
OPTION(paxos_stash_full_interval, OPT_INT, 25) // how often (in commits) to stash a full copy of the PaxosService state
OPTION(paxos_max_join_drift, OPT_INT, 10) // max paxos iterations before we must first sync the monitor stores
db->submit_transaction_sync(dbt);
}
- void init_options() {
- db->init();
- if (g_conf->mon_leveldb_write_buffer_size)
- db->options.write_buffer_size = g_conf->mon_leveldb_write_buffer_size;
- if (g_conf->mon_leveldb_cache_size)
- db->options.cache_size = g_conf->mon_leveldb_cache_size;
- if (g_conf->mon_leveldb_block_size)
- db->options.block_size = g_conf->mon_leveldb_block_size;
- if (g_conf->mon_leveldb_bloom_size)
- db->options.bloom_size = g_conf->mon_leveldb_bloom_size;
- if (g_conf->mon_leveldb_compression)
- db->options.compression_enabled = g_conf->mon_leveldb_compression;
- if (g_conf->mon_leveldb_max_open_files)
- db->options.max_open_files = g_conf->mon_leveldb_max_open_files;
- if (g_conf->mon_leveldb_paranoid)
- db->options.paranoid_checks = g_conf->mon_leveldb_paranoid;
- if (g_conf->mon_leveldb_log.length())
- db->options.log_file = g_conf->mon_leveldb_log;
- }
-
int open(ostream &out) {
- init_options();
+ db->init();
return db->open(out);
}
int create_and_open(ostream &out) {
- init_options();
+ db->init();
return db->create_and_open(out);
}