Skip to content
Permalink
Browse files

fixed #582 ALTER percolate index stuck waiting search load; set prefe…

…r writer for RT and percolate indexes
  • Loading branch information
tomatolog committed Nov 29, 2018
1 parent 3f7e7eb commit c26a236bd42b7082db079a51a84172066d337d64
Showing with 10 additions and 1 deletion.
  1. +5 −1 src/searchd.cpp
  2. +5 −0 src/sphinxstd.h
@@ -838,7 +838,11 @@ void ServedStats_c::CalcStatsForInterval ( const QueryStatContainer_i * pContain
}

//////////////////////////////////////////////////////////////////////////
ServedIndex_c::ServedIndex_c ( const ServedDesc_t& tDesc )

// want write lock to wipe out reader and not wait readers
// but only for RT and PQ indexes as these operations are rare there
ServedIndex_c::ServedIndex_c ( const ServedDesc_t & tDesc )
: m_tLock ( tDesc.m_eType==eITYPE::RT || tDesc.m_eType==eITYPE::PERCOLATE )
{
*(ServedDesc_t*)(this) = tDesc;
}
@@ -3547,6 +3547,11 @@ class RwLock_t : public CSphRwlock
{
Verify ( Done());
}

explicit RwLock_t ( bool bPreferWriter )
{
Verify ( Init ( bPreferWriter ) );
}
};


0 comments on commit c26a236

Please sign in to comment.