Skip to content
Permalink
Browse files
fixed #1072 crash on replace document in disk chunk of RT index
(cherry picked from commit 8341c67)
  • Loading branch information
tomatolog authored and adriannuta committed Oct 17, 2019
1 parent f71616b commit 301a806b14725e842300ee225521407464374c41
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/killlist.h
  2. +2 −2 src/sphinxrt.cpp
@@ -104,7 +104,7 @@ class DocidListReader_c

DocidListReader_c ( const VecTraits_T<DocID_t> & dKlist )
: m_pIterator ( dKlist.Begin() )
, m_pMaxIterator ( dKlist.End() )
, m_pMaxIterator ( dKlist.Begin() + dKlist.GetLength() ) // should be this way till VecTraits.End got fixed
{}


@@ -1066,7 +1066,7 @@ class RtIndex_c : public RtIndex_i, public ISphNoncopyable, public ISphWordlist,
bool DeleteDocument ( const DocID_t * pDocs, int iDocs, CSphString & sError, RtAccum_t * pAccExt ) final;
bool Commit ( int * pDeleted, RtAccum_t * pAccExt ) final;
void RollBack ( RtAccum_t * pAccExt ) final;
bool CommitReplayable ( RtSegment_t * pNewSeg, CSphVector<DocID_t> & dAccKlist,
bool CommitReplayable ( RtSegment_t * pNewSeg, const CSphVector<DocID_t> & dAccKlist,
int * pTotalKilled, bool bForceDump ) EXCLUDES (m_tChunkLock ); // FIXME? protect?
void ForceRamFlush ( bool bPeriodic=false ) final;
bool IsFlushNeed() const final;
@@ -2605,7 +2605,7 @@ int RtIndex_c::ApplyKillList ( const CSphVector<DocID_t> & dAccKlist )
}


bool RtIndex_c::CommitReplayable ( RtSegment_t * pNewSeg, CSphVector<DocID_t> & dAccKlist, int * pTotalKilled, bool bForceDump )
bool RtIndex_c::CommitReplayable ( RtSegment_t * pNewSeg, const CSphVector<DocID_t> & dAccKlist, int * pTotalKilled, bool bForceDump )
{
// store statistics, because pNewSeg just might get merged
int iNewDocs = pNewSeg ? pNewSeg->m_uRows : 0;

0 comments on commit 301a806

Please sign in to comment.