Permalink
Browse files

fixed #241 github#70 some index settings got lost next after seamless…

… rotation
  • Loading branch information...
tomatolog committed Apr 19, 2018
1 parent 2541065 commit 546e2297a01cc2913bc0d33052d5bcefae8737eb
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/searchd.cpp
@@ -18584,14 +18584,20 @@ static bool RotateIndexMT ( const CSphString & sIndex, CSphString & sError )
ServedDesc_t tNewIndex;
tNewIndex.m_bOnlyNew = pRotating->m_bOnlyNew;
// keep settings from current index description
tNewIndex.m_bMlock = pRotating->m_bMlock;
tNewIndex.m_iExpandKeywords = pRotating->m_iExpandKeywords;
tNewIndex.m_bPreopen = pRotating->m_bPreopen;
tNewIndex.m_sGlobalIDFPath = pRotating->m_sGlobalIDFPath;
tNewIndex.m_bOnDiskAttrs = pRotating->m_bOnDiskAttrs;
tNewIndex.m_bOnDiskPools = pRotating->m_bOnDiskPools;
// set settings into index
tNewIndex.m_pIndex = sphCreateIndexPhrase ( sIndex.cstr(), NULL );
tNewIndex.m_pIndex->m_iExpandKeywords = pRotating->m_iExpandKeywords;
tNewIndex.m_pIndex->m_iExpansionLimit = g_iExpansionLimit;
tNewIndex.m_pIndex->SetPreopen ( pRotating->m_bPreopen || g_bPreopenIndexes );
tNewIndex.m_pIndex->SetGlobalIDFPath ( pRotating->m_sGlobalIDFPath );
tNewIndex.m_bMlock = pRotating->m_bMlock;
tNewIndex.m_bOnDiskAttrs = pRotating->m_bOnDiskAttrs;
tNewIndex.m_bOnDiskPools = pRotating->m_bOnDiskPools;
tNewIndex.m_pIndex->SetMemorySettings ( tNewIndex.m_bMlock, tNewIndex.m_bOnDiskAttrs, tNewIndex.m_bOnDiskPools );
CSphString sIndexPath = pRotating->m_sIndexPath;

0 comments on commit 546e229

Please sign in to comment.