mirror of
https://github.com/gigablast/open-source-search-engine.git
synced 2024-10-04 12:17:35 +03:00
printlocktable() function
This commit is contained in:
parent
9bf8bf7712
commit
0edcbcc7d8
33
Spider.cpp
33
Spider.cpp
@ -1789,6 +1789,39 @@ bool SpiderColl::printWaitingTree ( ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SpiderLoop::printLockTable ( ) {
|
||||
// count locks
|
||||
HashTableX *ht = &g_spiderLoop.m_lockTable;
|
||||
// scan the slots
|
||||
long ns = ht->m_numSlots;
|
||||
for ( long i = 0 ; i < ns ; i++ ) {
|
||||
// skip if empty
|
||||
if ( ! ht->m_flags[i] ) continue;
|
||||
// cast lock
|
||||
UrlLock *lock = (UrlLock *)ht->getValueFromSlot(i);
|
||||
// get the key
|
||||
long long uh48 = *(long long *)ht->getKeyFromSlot(i);
|
||||
// show it
|
||||
log("dump: lock. "
|
||||
"uh48=%lli "
|
||||
"spiderout=%li "
|
||||
"confirmed=%li "
|
||||
"firstip=%s "
|
||||
"expires=%li "
|
||||
"timestamp=%li "
|
||||
"sequence=%li "
|
||||
,uh48
|
||||
,(long)(lock->m_spiderOutstanding)
|
||||
,(long)(lock->m_confirmed)
|
||||
,iptoa(lock->m_firstIp)
|
||||
,lock->m_expires
|
||||
,lock->m_timestamp
|
||||
,lock->m_lockSequence
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//////
|
||||
//
|
||||
// . 1. called by addSpiderReply(). it should have the sameIpWait available
|
||||
|
2
Spider.h
2
Spider.h
@ -1232,6 +1232,8 @@ class SpiderLoop {
|
||||
|
||||
bool isInLockTable ( long long probDocId );
|
||||
|
||||
bool printLockTable ( );
|
||||
|
||||
long getNumSpidersOutPerIp ( long firstIp ) ;
|
||||
|
||||
// free all XmlDocs and m_list
|
||||
|
6
gb.conf
6
gb.conf
@ -57,7 +57,7 @@
|
||||
<doNarrowSearch>0</>
|
||||
|
||||
# Overrides all spidering for all collections on just this host.
|
||||
<localSpideringEnabled>1</>
|
||||
<localSpideringEnabled>0</>
|
||||
|
||||
# Overrides all add urls for all collections on just this host.
|
||||
<localAddUrlEnabled>1</>
|
||||
@ -73,10 +73,10 @@
|
||||
<qaSearchTestEnabled>1</>
|
||||
|
||||
# Enable spidering on all hosts
|
||||
<allSpidersOn>1</>
|
||||
<allSpidersOn>0</>
|
||||
|
||||
# Disable spidering on all hosts
|
||||
<allSpidersOff>1</>
|
||||
<allSpidersOff>0</>
|
||||
|
||||
# Serves ads unless pure=1 is in cgi parms.
|
||||
<adFeedEnabled>0</>
|
||||
|
Loading…
Reference in New Issue
Block a user