Skip to content

Commit

Permalink
fix update config (#4915)
Browse files Browse the repository at this point in the history
  • Loading branch information
cangfengzhs committed Nov 23, 2022
1 parent 9e042ce commit 2c447a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/common/meta/GflagsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,14 @@ std::string GflagsManager::ValueToGflagString(const Value& val) {
std::transform(kvs.begin(), kvs.end(), values.begin(), [](const auto& iter) -> std::string {
std::stringstream out;
out << "\"" << iter.first << "\""
<< ":"
<< "\"" << iter.second << "\"";
<< ":";
if (iter.second.isStr() || iter.second.isBool()) {
out << iter.second;
} else {
out << "\"" << iter.second << "\"";
}
return out.str();
});

std::stringstream os;
os << "{" << folly::join(",", values) << "}";
return os.str();
Expand Down
2 changes: 1 addition & 1 deletion tests/admin/test_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_configs(self):
resp = self.client.execute('''
UPDATE CONFIGS storage:rocksdb_column_family_options={
max_bytes_for_level_base="268435456",
write_buffer_size="67108864",
write_buffer_size="33554432",
max_write_buffer_number="4"}
''')
self.check_resp_succeeded(resp)
Expand Down

0 comments on commit 2c447a9

Please sign in to comment.