@@ -166,13 +166,8 @@ void TNodeWarden::ApplyStateStorageConfig(const NKikimrBlobStorage::TStorageConf
166166 const bool changedStateStorage = !StateStorageProxyConfigured || changed (*StateStorageInfo, *stateStorageInfo);
167167 const bool changedBoard = !StateStorageProxyConfigured || changed (*BoardInfo, *boardInfo);
168168 const bool changedSchemeBoard = !StateStorageProxyConfigured || changed (*SchemeBoardInfo, *schemeBoardInfo);
169- if (changedStateStorage || changedBoard || changedSchemeBoard) { // reconfigure proxy
170- STLOG (PRI_INFO, BS_NODE, NW50, " updating state storage proxy configuration" );
171- Send (MakeStateStorageProxyID (), new TEvStateStorage::TEvUpdateGroupConfig (stateStorageInfo, boardInfo,
172- schemeBoardInfo));
173- StateStorageProxyConfigured = true ;
174- } else { // no changes
175- return ;
169+ if (!changedStateStorage && !changedBoard && !changedSchemeBoard) {
170+ return ; // no changes
176171 }
177172
178173 // start new replicas if needed
@@ -225,6 +220,19 @@ void TNodeWarden::ApplyStateStorageConfig(const NKikimrBlobStorage::TStorageConf
225220 const TActorId actorId = as->RegisterLocalService (actorId, TActorId ());
226221 TActivationContext::Send (new IEventHandle (TEvents::TSystem::Poison, 0 , actorId, SelfId (), nullptr , 0 ));
227222 }
223+
224+ // reconfigure proxy
225+ STLOG (PRI_INFO, BS_NODE, NW50, " updating state storage proxy configuration" );
226+ if (StateStorageProxyConfigured) {
227+ Send (MakeStateStorageProxyID (), new TEvStateStorage::TEvUpdateGroupConfig (StateStorageInfo, BoardInfo,
228+ SchemeBoardInfo));
229+ } else {
230+ const TActorId newInstance = as->Register (CreateStateStorageProxy (StateStorageInfo, BoardInfo, SchemeBoardInfo),
231+ TMailboxType::ReadAsFilled, AppData ()->SystemPoolId );
232+ const TActorId stubInstance = as->RegisterLocalService (MakeStateStorageProxyID (), newInstance);
233+ TActivationContext::Send (new IEventHandle (TEvents::TSystem::Poison, 0 , stubInstance, newInstance, nullptr , 0 ));
234+ StateStorageProxyConfigured = true ;
235+ }
228236}
229237
230238void TNodeWarden::ApplyStaticServiceSet (const NKikimrBlobStorage::TNodeWardenServiceSet& ss) {
0 commit comments