Skip to content

Commit

Permalink
fixed missed error message invalid cluster delete
Browse files Browse the repository at this point in the history
  • Loading branch information
tomatolog committed Feb 15, 2024
1 parent b5fee21 commit 7643976
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/searchdreplication.cpp
Expand Up @@ -1684,17 +1684,24 @@ bool GloballyDeleteCluster ( const CSphString & sCluster, CSphString & sError )
{
TlsMsg::Err();
if ( !g_bReplicationStarted )
return TlsMsg::Err ( "cluster '%s' is not ready, replication wasn't started", sCluster.cstr() );
{
sError.SetSprintf ( "cluster '%s' is not ready, replication wasn't started", sCluster.cstr() );
return false;
}

auto pCluster = ClusterByName ( sCluster );
if ( !pCluster )
{
TlsMsg::MoveError ( sError );
return false;
}

auto dNodes = pCluster->FilterViewNodesByProto();
SendClusterDeleteToNodes ( dNodes, sCluster );
bool bOk = ClusterDelete ( sCluster );
bOk &= SaveConfigInt ( sError );

TlsMsg::MoveError ( sError );
return bOk;
}

Expand Down

0 comments on commit 7643976

Please sign in to comment.