Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c447a9

Browse files
authored
fix update config (vesoft-inc#4915)
1 parent 9e042ce commit 2c447a9

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/common/meta/GflagsManager.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,14 @@ std::string GflagsManager::ValueToGflagString(const Value& val) {
196196
std::transform(kvs.begin(), kvs.end(), values.begin(), [](const auto& iter) -> std::string {
197197
std::stringstream out;
198198
out << "\"" << iter.first << "\""
199-
<< ":"
200-
<< "\"" << iter.second << "\"";
199+
<< ":";
200+
if (iter.second.isStr() || iter.second.isBool()) {
201+
out << iter.second;
202+
} else {
203+
out << "\"" << iter.second << "\"";
204+
}
201205
return out.str();
202206
});
203-
204207
std::stringstream os;
205208
os << "{" << folly::join(",", values) << "}";
206209
return os.str();

tests/admin/test_configs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def test_configs(self):
120120
resp = self.client.execute('''
121121
UPDATE CONFIGS storage:rocksdb_column_family_options={
122122
max_bytes_for_level_base="268435456",
123-
write_buffer_size="67108864",
123+
write_buffer_size="33554432",
124124
max_write_buffer_number="4"}
125125
''')
126126
self.check_resp_succeeded(resp)

0 commit comments

Comments
 (0)