Navigation Menu

Skip to content

Commit

Permalink
fixed warning about low memory limit on indexing; fixed #2522
Browse files Browse the repository at this point in the history
  • Loading branch information
tomatolog committed Apr 25, 2022
1 parent c63304a commit 2656717
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/dict/bin.cpp
Expand Up @@ -30,7 +30,7 @@ CSphBin::CSphBin ( ESphHitless eMode, bool bWordDict )
#endif
}

int CSphBin::CalcBinSize ( int iMemoryLimit, int iBlocks, const char* sPhase, bool bWarn )
int CSphBin::CalcBinSize ( int iMemoryLimit, int iBlocks, const char* sPhase )
{
if ( iBlocks <= 0 )
return CSphBin::MIN_SIZE;
Expand All @@ -46,11 +46,10 @@ int CSphBin::CalcBinSize ( int iMemoryLimit, int iBlocks, const char* sPhase, bo
iBinSize * iBlocks / 1024 );
}

if ( iBinSize < CSphBin::WARN_SIZE && bWarn )
if ( iBinSize < CSphBin::WARN_SIZE )
{
sphWarn ( "%s: merge_block_size=%d kb too low, increasing mem_limit may improve performance",
sPhase,
iBinSize / 1024 );
sphWarn ( "%s: increasing mem_limit may improve performance",
sPhase );
}

return iBinSize;
Expand Down
2 changes: 1 addition & 1 deletion src/dict/bin.h
Expand Up @@ -70,7 +70,7 @@ struct CSphBin
explicit CSphBin ( ESphHitless eMode = SPH_HITLESS_NONE, bool bWordDict = false );
~CSphBin();

static int CalcBinSize ( int iMemoryLimit, int iBlocks, const char* sPhase, bool bWarn = true );
static int CalcBinSize ( int iMemoryLimit, int iBlocks, const char* sPhase );
void Init ( int iFD, SphOffset_t* pSharedOffset, const int iBinSize );

SphWordID_t ReadVLB();
Expand Down

0 comments on commit 2656717

Please sign in to comment.