Skip to content

Commit

Permalink
[enhance] use correct default value for show config action (#19284)
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteYue committed Sep 1, 2023
1 parent d96bc2d commit c31cb5f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 5 additions & 1 deletion be/src/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,11 @@ std::vector<std::vector<std::string>> get_config_info() {
_config.push_back(it.first);

_config.push_back(field_it->second.type);
_config.push_back(it.second);
if (0 == strcmp(field_it->second.type, "bool")) {
_config.push_back(it.second == "1" ? "true" : "false");
} else {
_config.push_back(it.second);
}
_config.push_back(field_it->second.valmutable ? "true" : "false");

configs.push_back(_config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,23 @@ suite("test_compaction_cumu_delete") {
assert configList instanceof List

boolean disableAutoCompaction = true
boolean allowDeleteWhenCumu = false
for (Object ele in (List) configList) {
assert ele instanceof List<String>
if (((List<String>) ele)[0] == "disable_auto_compaction") {
disableAutoCompaction = Boolean.parseBoolean(((List<String>) ele)[2])
}
if (((List<String>) ele)[0] == "enable_delete_when_cumu_compaction") {
allowDeleteWhenCumu = Boolean.parseBoolean(((List<String>) ele)[2])
}
}

if (!allowDeleteWhenCumu) {
logger.info("Skip test compaction when cumu compaction because not enabled this config")
return
}


def triggerCompaction = { be_host, be_http_port, compact_type ->
// trigger compactions for all tablets in ${tableName}
String tablet_id = tablet[0]
Expand Down

0 comments on commit c31cb5f

Please sign in to comment.