mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-15 02:36:08 -04:00
Merge branch 'ia' into ia-zak
This commit is contained in:
2
Conf.cpp
2
Conf.cpp
@ -369,7 +369,7 @@ bool Conf::init ( char *dir ) { // , int32_t hostId ) {
|
||||
g_conf.m_forceIt = false;
|
||||
|
||||
// always turn on threads if live
|
||||
if ( g_conf.m_isLive ) g_conf.m_useThreads = true;
|
||||
//if ( g_conf.m_isLive ) g_conf.m_useThreads = true;
|
||||
// disable this at startup always... no since might have crashed
|
||||
// in the middle of a test. and we just turn on spiders again when
|
||||
// already in test mode otherwise hostid #0 will erase all the files.
|
||||
|
11
RdbMap.cpp
11
RdbMap.cpp
@ -1295,12 +1295,13 @@ void RdbMap::reduceMemFootPrint () {
|
||||
for ( ; s && *s && ! is_digit(*s) ; s++ );
|
||||
int id = 0;
|
||||
if ( s ) id = atoi(s);
|
||||
if ( id && (id % 2) == 0 ) return;
|
||||
// id can be zero like for spiderdb0000.map
|
||||
if ( (id % 2) == 0 ) return;
|
||||
|
||||
// log("map: reducing mem footprint for %s/%s",
|
||||
// m_file.getDir(),
|
||||
// m_file.getFilename());
|
||||
|
||||
// log("map: reducing mem footprint for %s/%s",
|
||||
// m_file.getDir(),
|
||||
// m_file.getFilename());
|
||||
|
||||
// seems kinda buggy now..
|
||||
m_reducedMem = true;
|
||||
//return;
|
||||
|
@ -927,9 +927,12 @@ void handleRequest54 ( UdpSlot *udpSlot , int32_t niceness ) {
|
||||
// and the loadbucket id
|
||||
//*(int32_t *)p = bb.m_id; p += 4;
|
||||
|
||||
int32_t sanityCount = s_loadTable.getNumSlots();
|
||||
|
||||
// now remove old entries from the load table. entries that
|
||||
// have completed and have a download end time more than 10 mins ago
|
||||
for ( int32_t i = 0 ; i < s_loadTable.getNumSlots() ; i++ ) {
|
||||
if ( sanityCount-- < 0 ) break;
|
||||
// skip if empty
|
||||
if ( ! s_loadTable.m_flags[i] ) continue;
|
||||
// get the bucket
|
||||
|
Reference in New Issue
Block a user