提交 e950fff6 编写于 作者: Z zhiru

add MySQLMetaImpl::UpdateTableFilesToIndex and set maximum_memory to default if config value = 0


Former-commit-id: f8943149b9737b2f0107308aa96a7f77acdf9ce4
上级 5f3533ba
此差异已折叠。
......@@ -63,7 +63,7 @@ struct Options {
size_t index_trigger_size = ONE_GB; //unit: byte
DBMetaOptions meta;
int mode = MODE::SINGLE;
float maximum_memory = 4 * ONE_GB;
size_t maximum_memory = 4 * ONE_GB;
}; // Options
......
......@@ -28,11 +28,11 @@ DBWrapper::DBWrapper() {
if(index_size > 0) {//ensure larger than zero, unit is MB
opt.index_trigger_size = (size_t)index_size * engine::ONE_MB;
}
float maximum_memory = config.GetFloatValue(CONFIG_MAXMIMUM_MEMORY);
int64_t maximum_memory = config.GetInt64Value(CONFIG_MAXMIMUM_MEMORY);
if (maximum_memory > 1.0) {
opt.maximum_memory = maximum_memory * engine::ONE_GB;
}
else {
else if (maximum_memory != 0) { //if maximum_memory = 0, set it to default
std::cout << "ERROR: maximum_memory should be at least 1 GB" << std::endl;
kill(0, SIGUSR1);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册