From 77e23b84c31f25c75bbb0b617077b41f9f1cf018 Mon Sep 17 00:00:00 2001 From: vporyadke Date: Fri, 25 Oct 2024 00:05:40 +0300 Subject: [PATCH] fix use after free on follower deletion (#10863) --- ydb/core/mind/hive/hive_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ydb/core/mind/hive/hive_impl.cpp b/ydb/core/mind/hive/hive_impl.cpp index cafce3a1b80f..9c250e144647 100644 --- a/ydb/core/mind/hive/hive_impl.cpp +++ b/ydb/core/mind/hive/hive_impl.cpp @@ -257,12 +257,12 @@ void THive::ExecuteProcessBootQueue(NIceDb::TNiceDb& db, TSideEffects& sideEffec sideEffects.Send(actorToNotify, new TEvPrivate::TEvRestartComplete(tablet->GetFullTabletId(), "boot delay")); } tablet->ActorsToNotifyOnRestart.clear(); + tablet->InWaitQueue = true; if (tablet->IsFollower()) { TLeaderTabletInfo& leader = tablet->GetLeader(); - UpdateTabletFollowersNumber(leader, db, sideEffects); + UpdateTabletFollowersNumber(leader, db, sideEffects); // this may delete tablet } BootQueue.AddToWaitQueue(record); // waiting for new node - tablet->InWaitQueue = true; continue; } }