printlocktable() function

This commit is contained in:
mwells 2013-09-29 10:20:14 -06:00
parent 9bf8bf7712
commit 0edcbcc7d8
3 changed files with 38 additions and 3 deletions

View File

@ -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

View File

@ -1232,6 +1232,8 @@ class SpiderLoop {
bool isInLockTable ( long long probDocId );
bool printLockTable ( );
long getNumSpidersOutPerIp ( long firstIp ) ;
// free all XmlDocs and m_list

View File

@ -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</>