Skip to content

Commit fcb8576

Browse files
authored
Fix distconf startup bug (#7094)
1 parent b1edf9e commit fcb8576

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

ydb/core/blobstorage/nodewarden/distconf.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ namespace NKikimr::NStorage {
197197
switch (ev->GetTypeRewrite()) {
198198
case TEvInterconnect::TEvNodesInfo::EventType:
199199
Handle(reinterpret_cast<TEvInterconnect::TEvNodesInfo::TPtr&>(ev));
200-
if (!NodeIds.empty()) {
200+
if (!NodeIds.empty() || !IsSelfStatic) {
201201
change = !std::exchange(NodeListObtained, true);
202202
}
203203
break;
@@ -220,6 +220,10 @@ namespace NKikimr::NStorage {
220220
}
221221

222222
if (change && NodeListObtained && StorageConfigLoaded) {
223+
if (IsSelfStatic) {
224+
UpdateBound(SelfNode.NodeId(), SelfNode, *StorageConfig, nullptr);
225+
IssueNextBindRequest();
226+
}
223227
processPendingEvents();
224228
}
225229
}

ydb/core/blobstorage/nodewarden/distconf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ namespace NKikimr::NStorage {
220220
std::deque<TAutoPtr<IEventHandle>> PendingEvents;
221221
std::vector<ui32> NodeIds;
222222
TNodeIdentifier SelfNode;
223-
bool SelfBound = false;
224223

225224
// scatter tasks
226225
ui64 NextScatterCookie = RandomNumber<ui64>();

ydb/core/blobstorage/nodewarden/distconf_binding.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ namespace NKikimr::NStorage {
5858
// issue updates
5959
NodeIds = std::move(nodeIds);
6060
BindQueue.Update(NodeIds);
61-
if (NodeListObtained && StorageConfigLoaded && !std::exchange(SelfBound, true)) {
62-
UpdateBound(SelfNode.NodeId(), SelfNode, *StorageConfig, nullptr);
61+
if (NodeListObtained && StorageConfigLoaded) {
6362
IssueNextBindRequest();
6463
}
6564
}
6665

6766
void TDistributedConfigKeeper::IssueNextBindRequest() {
67+
Y_DEBUG_ABORT_UNLESS(IsSelfStatic);
6868
CheckRootNodeStatus();
6969
if (RootState == ERootState::INITIAL && !Binding && AllBoundNodes.size() < NodeIds.size()) {
7070
const TMonotonic now = TActivationContext::Monotonic();

0 commit comments

Comments
 (0)