Skip to content

Commit ea9fe63

Browse files
authored
Enable distconf by default and fix race issue KIKIMR-19031 (#875)
1 parent 27420cd commit ea9fe63

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ydb/core/blobstorage/nodewarden/distconf.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ namespace NKikimr::NStorage {
173173
break;
174174
}
175175

176-
if (NodeListObtained && StorageConfigLoaded && change) {
176+
if (change && NodeListObtained && StorageConfigLoaded) {
177177
UpdateBound(SelfNode.NodeId(), SelfNode, *StorageConfig, nullptr);
178178
IssueNextBindRequest();
179179
processPendingEvents();
@@ -202,8 +202,11 @@ namespace NKikimr::NStorage {
202202
}
203203

204204
void TNodeWarden::StartDistributedConfigKeeper() {
205-
return;
206-
DistributedConfigKeeperId = Register(new TDistributedConfigKeeper(Cfg, StorageConfig));
205+
auto *appData = AppData();
206+
if (!appData->DynamicNameserviceConfig || SelfId().NodeId() <= appData->DynamicNameserviceConfig->MaxStaticNodeId) {
207+
// start distributed configuration machinery only on static nodes
208+
DistributedConfigKeeperId = Register(new TDistributedConfigKeeper(Cfg, StorageConfig));
209+
}
207210
}
208211

209212
void TNodeWarden::ForwardToDistributedConfigKeeper(STATEFN_SIG) {

ydb/core/blobstorage/nodewarden/distconf_binding.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ namespace NKikimr::NStorage {
5858
// issue updates
5959
NodeIds = std::move(nodeIds);
6060
BindQueue.Update(NodeIds);
61-
if (StorageConfig) {
61+
if (NodeListObtained && StorageConfigLoaded) {
6262
IssueNextBindRequest();
6363
}
6464
}

0 commit comments

Comments
 (0)