未验证 提交 c117d770 编写于 作者: L Lai Yingchun 提交者: GitHub

manual compact: target_level == -1 is valid (#54)

上级 0337f758
......@@ -165,8 +165,9 @@ void pagasus_manual_compact_service::extract_manual_compact_opts(
auto find = envs.find(key_prefix + MANUAL_COMPACT_TARGET_LEVEL_KEY);
if (find != envs.end()) {
int32_t target_level;
if (dsn::buf2int32(find->second, target_level) && target_level >= 1 &&
target_level <= _app->_db_opts.num_levels) {
if (dsn::buf2int32(find->second, target_level) &&
(target_level == -1 ||
(target_level >= 1 && target_level <= _app->_db_opts.num_levels))) {
options.target_level = target_level;
} else {
dwarn_replica("{}={} is invalid, use default value {}",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册