diff options
| author | Alexander Rutkovsky <[email protected]> | 2024-07-25 17:05:25 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-07-25 14:05:25 +0000 |
| commit | fcb8576bca10e09299cbc77439666d99abfb7f90 (patch) | |
| tree | 90fa09689904cc71fcafd3eed66d48a61222c578 | |
| parent | b1edf9e53bcedbbee52bd4c4f377eacb52cce6f0 (diff) | |
Fix distconf startup bug (#7094)
| -rw-r--r-- | ydb/core/blobstorage/nodewarden/distconf.cpp | 6 | ||||
| -rw-r--r-- | ydb/core/blobstorage/nodewarden/distconf.h | 1 | ||||
| -rw-r--r-- | ydb/core/blobstorage/nodewarden/distconf_binding.cpp | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/ydb/core/blobstorage/nodewarden/distconf.cpp b/ydb/core/blobstorage/nodewarden/distconf.cpp index 84ad8a34399..4ae279067e8 100644 --- a/ydb/core/blobstorage/nodewarden/distconf.cpp +++ b/ydb/core/blobstorage/nodewarden/distconf.cpp @@ -197,7 +197,7 @@ namespace NKikimr::NStorage { switch (ev->GetTypeRewrite()) { case TEvInterconnect::TEvNodesInfo::EventType: Handle(reinterpret_cast<TEvInterconnect::TEvNodesInfo::TPtr&>(ev)); - if (!NodeIds.empty()) { + if (!NodeIds.empty() || !IsSelfStatic) { change = !std::exchange(NodeListObtained, true); } break; @@ -220,6 +220,10 @@ namespace NKikimr::NStorage { } if (change && NodeListObtained && StorageConfigLoaded) { + if (IsSelfStatic) { + UpdateBound(SelfNode.NodeId(), SelfNode, *StorageConfig, nullptr); + IssueNextBindRequest(); + } processPendingEvents(); } } diff --git a/ydb/core/blobstorage/nodewarden/distconf.h b/ydb/core/blobstorage/nodewarden/distconf.h index 075288efcd9..723795409f3 100644 --- a/ydb/core/blobstorage/nodewarden/distconf.h +++ b/ydb/core/blobstorage/nodewarden/distconf.h @@ -220,7 +220,6 @@ namespace NKikimr::NStorage { std::deque<TAutoPtr<IEventHandle>> PendingEvents; std::vector<ui32> NodeIds; TNodeIdentifier SelfNode; - bool SelfBound = false; // scatter tasks ui64 NextScatterCookie = RandomNumber<ui64>(); diff --git a/ydb/core/blobstorage/nodewarden/distconf_binding.cpp b/ydb/core/blobstorage/nodewarden/distconf_binding.cpp index ebce2c6383e..e804a67a98b 100644 --- a/ydb/core/blobstorage/nodewarden/distconf_binding.cpp +++ b/ydb/core/blobstorage/nodewarden/distconf_binding.cpp @@ -58,13 +58,13 @@ namespace NKikimr::NStorage { // issue updates NodeIds = std::move(nodeIds); BindQueue.Update(NodeIds); - if (NodeListObtained && StorageConfigLoaded && !std::exchange(SelfBound, true)) { - UpdateBound(SelfNode.NodeId(), SelfNode, *StorageConfig, nullptr); + if (NodeListObtained && StorageConfigLoaded) { IssueNextBindRequest(); } } void TDistributedConfigKeeper::IssueNextBindRequest() { + Y_DEBUG_ABORT_UNLESS(IsSelfStatic); CheckRootNodeStatus(); if (RootState == ERootState::INITIAL && !Binding && AllBoundNodes.size() < NodeIds.size()) { const TMonotonic now = TActivationContext::Monotonic(); |
