Skip to content

Commit 35c4c8a

Browse files
authored
Fix ydb cli admin cluster config fetch (#14406)
1 parent 76e7d82 commit 35c4c8a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ydb/public/lib/ydb_cli/commands/ydb_dynamic_config.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ void TCommandConfigFetch::Parse(TConfig& config) {
7979
}
8080

8181
int TCommandConfigFetch::Run(TConfig& config) {
82+
if (AllowEmptyDatabase) {
83+
// explicitly clear database to get cluster database
84+
// in `ydb admin cluster config fetch` even if
85+
// some database is set by mistake
86+
config.Database.clear();
87+
}
8288
auto driver = std::make_unique<NYdb::TDriver>(CreateDriver(config));
8389
auto client = NYdb::NDynamicConfig::TDynamicConfigClient(*driver);
8490
auto result = client.GetConfig().GetValueSync();

0 commit comments

Comments
 (0)