Skip to content

Commit

Permalink
Enable distconf by default and fix race issue KIKIMR-19031
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvru committed Jan 10, 2024
1 parent 2189828 commit 94cc328
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions ydb/core/blobstorage/nodewarden/distconf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ namespace NKikimr::NStorage {
break;
}

if (NodeListObtained && StorageConfigLoaded && change) {
if (change && NodeListObtained && StorageConfigLoaded) {
UpdateBound(SelfNode.NodeId(), SelfNode, *StorageConfig, nullptr);
IssueNextBindRequest();
processPendingEvents();
Expand Down Expand Up @@ -202,8 +202,11 @@ namespace NKikimr::NStorage {
}

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

void TNodeWarden::ForwardToDistributedConfigKeeper(STATEFN_SIG) {
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/blobstorage/nodewarden/distconf_binding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace NKikimr::NStorage {
// issue updates
NodeIds = std::move(nodeIds);
BindQueue.Update(NodeIds);
if (StorageConfig) {
if (NodeListObtained && StorageConfigLoaded) {
IssueNextBindRequest();
}
}
Expand Down

0 comments on commit 94cc328

Please sign in to comment.