Permalink
Browse files

fixed deadlock at rotation

  • Loading branch information...
tomatolog committed Oct 18, 2018
1 parent 822e93c commit eee381754e902a43a8f499e1c950198a2a3e6ee0
Showing with 9 additions and 5 deletions.
  1. +9 −5 src/searchd.cpp
@@ -18738,12 +18738,16 @@ void RotationThreadFunc ( void * )
CSphString sIndex;
bool bMutable = false;
{
RLockedServedIt_c it ( g_pDisabledIndexes );
it.Next();
sIndex = it.GetName ();
assert ( g_pLocalIndexes->Contains ( sIndex ));
ServedIndexRefPtr_c pIndex ( nullptr );
// scope for g_pDisabledIndexes
{
RLockedServedIt_c it ( g_pDisabledIndexes );
it.Next();
sIndex = it.GetName ();
pIndex = it.Get();
}
assert ( g_pLocalIndexes->Contains ( sIndex ) );
auto pIndex = it.Get();
if ( pIndex ) // that is rt/percolate. Plain locals has just name and nullptr index
{
ServedDescWPtr_c wLocked ( pIndex );

0 comments on commit eee3817

Please sign in to comment.