Remove unused/noop variable/function from SpiderColl

This commit is contained in:
Ai Lin Chia
2017-06-19 14:28:02 +02:00
parent f319ce7834
commit 69aa997443
3 changed files with 1 additions and 45 deletions

@ -324,15 +324,7 @@ static bool sendPage(State11 *st) {
sb.safePrintf ( "<br>\n" );
// then spider collection
SpiderColl *sc = g_spiderCache.getSpiderColl(collnum);
//
// spiderdb rec stats, from scanning spiderdb
//
// if not there, forget about it
if ( sc ) sc->printStats ( sb );
SpiderColl *sc = g_spiderCache.getSpiderColl(cr->m_collnum);
// done if no sc
if ( ! sc ) {

@ -44,7 +44,6 @@ CollectionRec *SpiderColl::getCollectionRec ( ) {
SpiderColl::SpiderColl(CollectionRec *cr) {
m_overflowList = NULL;
m_lastOverflowFirstIp = 0;
m_lastPrinted = 0;
m_deleteMyself = false;
m_isLoading = false;
m_gettingList1 = false;
@ -81,7 +80,6 @@ SpiderColl::SpiderColl(CollectionRec *cr) {
m_numAdded = 0;
m_numBytesScanned = 0;
m_lastPrintCount = 0;
m_lastPrinted = 0;
m_collnum = -1;
m_countingPagesIndexed = false;
m_lastReqUh48a = 0;
@ -1050,28 +1048,6 @@ int32_t SpiderColl::getNextIpFromWaitingTree ( ) {
}
}
uint64_t SpiderColl::getNextSpiderTimeFromWaitingTree ( ) {
ScopedLock sl(m_waitingTree.getLock());
// if nothing to scan, bail
if (m_waitingTree.isEmpty_unlocked() ) return 0LL;
// the key
key96_t mink; mink.setMin();
// set node from wait tree key. this way we can resume from a prev key
int32_t node = m_waitingTree.getNextNode_unlocked(0, (char *)&mink);
// if empty, stop
if ( node < 0 ) return 0LL;
// get the key
const key96_t *wk = reinterpret_cast<const key96_t*>(m_waitingTree.getKey_unlocked(node));
// time from that
uint64_t spiderTimeMS = (wk->n1);
spiderTimeMS <<= 32;
spiderTimeMS |= ((wk->n0) >> 32);
// stop if need to wait for this one
return spiderTimeMS;
}
void SpiderColl::gotSpiderdbWaitingTreeListWrapper(void *state, RdbList *list, Msg5 *msg5) {
SpiderColl *THIS = (SpiderColl *)state;
@ -3374,12 +3350,6 @@ void SpiderColl::setPriority(int32_t pri) {
m_msg5StartKey = m_nextDoledbKey;
}
bool SpiderColl::printStats ( SafeBuf &sb ) {
return true;
}
bool SpiderColl::tryToDeleteSpiderColl ( SpiderColl *sc , const char *msg ) {
// if not being deleted return false
if ( ! sc->m_deleteMyself ) return false;

@ -67,7 +67,6 @@ public:
key96_t m_nextKeys[MAX_SPIDER_PRIORITIES];
int64_t m_lastPrintCount;
int64_t m_lastPrinted;
// used by SpiderLoop.cpp
int32_t m_spidersOut;
@ -89,7 +88,6 @@ public:
bool printWaitingTree ( ) ;
bool addToWaitingTree(int32_t firstIp);
uint64_t getNextSpiderTimeFromWaitingTree ( ) ;
void populateDoledbFromWaitingTree ( );
void populateWaitingTreeFromSpiderdb ( bool reentry ) ;
@ -119,13 +117,9 @@ public:
key96_t m_nextDoledbKey;
int32_t m_pri2;
bool gettingSpiderdbList() const { return m_gettingList1; }
// how many outstanding spiders a priority has
int32_t m_outstandingSpiders[MAX_SPIDER_PRIORITIES];
bool printStats ( SafeBuf &sb ) ;
bool isFirstIpInOverflowList ( int32_t firstIp ) ;
private: