Skip to content

Commit

Permalink
Fix distconf startup bug (#7094)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvru authored Jul 25, 2024
1 parent b1edf9e commit fcb8576
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 5 additions & 1 deletion ydb/core/blobstorage/nodewarden/distconf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -220,6 +220,10 @@ namespace NKikimr::NStorage {
}

if (change && NodeListObtained && StorageConfigLoaded) {
if (IsSelfStatic) {
UpdateBound(SelfNode.NodeId(), SelfNode, *StorageConfig, nullptr);
IssueNextBindRequest();
}
processPendingEvents();
}
}
Expand Down
1 change: 0 additions & 1 deletion ydb/core/blobstorage/nodewarden/distconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>();
Expand Down
4 changes: 2 additions & 2 deletions ydb/core/blobstorage/nodewarden/distconf_binding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit fcb8576

Please sign in to comment.