Skip to content

Commit 7f71ba8

Browse files
EnjectionGazizonoki
authored andcommitted
RFC0113: rewire admin part of ydb-cli (#14350)
1 parent 3426999 commit 7f71ba8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/client/draft/ydb_dynamic_config.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,12 @@ class TDynamicConfigClient::TImpl : public TClientImplCommon<TDynamicConfigClien
156156
std::string config;
157157
std::map<uint64_t, std::string> volatileConfigs;
158158
if (Ydb::DynamicConfig::GetConfigResult result; any && any->UnpackTo(&result)) {
159-
clusterName = result.identity(0).cluster();
160-
version = result.identity(0).version();
161-
config = result.config(0);
159+
// only if they are present
160+
if (result.identity_size() && result.config_size()) {
161+
clusterName = result.identity(0).cluster();
162+
version = result.identity(0).version();
163+
config = result.config(0);
164+
}
162165
for (const auto& config : result.volatile_configs()) {
163166
volatileConfigs.emplace(config.id(), config.config());
164167
}

0 commit comments

Comments
 (0)