Permalink
Browse files

fixed crash on save percolate index without binlog

  • Loading branch information...
tomatolog committed Dec 13, 2018
1 parent 42da73c commit de9deda9c142823d6dbf529423417b5c670fae94
Showing with 5 additions and 4 deletions.
  1. +2 −0 src/sphinxint.h
  2. +3 −1 src/sphinxpq.cpp
  3. +0 −3 src/sphinxrt.h
@@ -81,6 +81,8 @@ extern const char * MAGIC_WORD_PARAGRAPH; ///< value is "\3paragraph"

/// binlog, defined in sphinxrt.cpp
extern class ISphBinlog * g_pBinlog;
ISphBinlog * GetBinlog();
int64_t GetRtFlushPeriod();

/// costs for max_predicted_time limits, defined in sphinxsearch.cpp
/// measured in nanoseconds (that is, 1e-9)
@@ -2141,7 +2141,9 @@ void PercolateIndex_c::SaveMeta ( bool bShutdown )

wrMeta.PutOffset ( m_iTID );

g_pBinlog->NotifyIndexFlush ( m_sIndexName.cstr(), m_iTID, bShutdown );
if ( GetBinlog() )
GetBinlog()->NotifyIndexFlush ( m_sIndexName.cstr(), m_iTID, bShutdown );

m_iSavedTID = m_iTID;
m_tmSaved = sphMicroTimer();

@@ -393,7 +393,4 @@ bool CreateReconfigure ( const CSphString & sIndexName, bool bIsStarDict, const
// Get global flag of w-available RT
volatile bool &RTChangesAllowed ();

ISphBinlog * GetBinlog();
int64_t GetRtFlushPeriod();

#endif // _sphinxrt_

0 comments on commit de9deda

Please sign in to comment.