aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Rutkovsky <alexvru@ydb.tech>2024-01-10 22:29:41 +0300
committerGitHub <noreply@github.com>2024-01-10 22:29:41 +0300
commitea9fe63ac25a3a9f5c546e061b558a9633cfa13c (patch)
tree75cd7a86ff76094598a4b46eae43ffe7060ef25c
parent27420cd0545f794356b8dc14b1a435837fcdc2fa (diff)
downloadydb-ea9fe63ac25a3a9f5c546e061b558a9633cfa13c.tar.gz
Enable distconf by default and fix race issue KIKIMR-19031 (#875)
-rw-r--r--ydb/core/blobstorage/nodewarden/distconf.cpp9
-rw-r--r--ydb/core/blobstorage/nodewarden/distconf_binding.cpp2
2 files changed, 7 insertions, 4 deletions
diff --git a/ydb/core/blobstorage/nodewarden/distconf.cpp b/ydb/core/blobstorage/nodewarden/distconf.cpp
index f6bbfc7347..35680ee3e4 100644
--- a/ydb/core/blobstorage/nodewarden/distconf.cpp
+++ b/ydb/core/blobstorage/nodewarden/distconf.cpp
@@ -173,7 +173,7 @@ namespace NKikimr::NStorage {
break;
}
- if (NodeListObtained && StorageConfigLoaded && change) {
+ if (change && NodeListObtained && StorageConfigLoaded) {
UpdateBound(SelfNode.NodeId(), SelfNode, *StorageConfig, nullptr);
IssueNextBindRequest();
processPendingEvents();
@@ -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) {
diff --git a/ydb/core/blobstorage/nodewarden/distconf_binding.cpp b/ydb/core/blobstorage/nodewarden/distconf_binding.cpp
index 7d6536ac45..1edbe5d272 100644
--- a/ydb/core/blobstorage/nodewarden/distconf_binding.cpp
+++ b/ydb/core/blobstorage/nodewarden/distconf_binding.cpp
@@ -58,7 +58,7 @@ namespace NKikimr::NStorage {
// issue updates
NodeIds = std::move(nodeIds);
BindQueue.Update(NodeIds);
- if (StorageConfig) {
+ if (NodeListObtained && StorageConfigLoaded) {
IssueNextBindRequest();
}
}