Skip to content

Commit

Permalink
fix for warning in crawl balancer
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3402 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Feb 26, 2007
1 parent ed021a3 commit e3480d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion source/de/anomic/data/wiki/wikiParser.java
Expand Up @@ -57,7 +57,6 @@
import de.anomic.data.wiki.tokens.TableToken;
import de.anomic.data.wiki.tokens.Token;
import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.yacy.yacyCore;

public class wikiParser {

Expand Down
11 changes: 6 additions & 5 deletions source/de/anomic/plasma/plasmaCrawlBalancer.java
Expand Up @@ -54,6 +54,7 @@
import java.util.TreeMap;

import de.anomic.kelondro.kelondroBase64Order;
import de.anomic.kelondro.kelondroRecords;
import de.anomic.kelondro.kelondroRow;
import de.anomic.kelondro.kelondroStack;
import de.anomic.server.logging.serverLog;
Expand Down Expand Up @@ -136,8 +137,8 @@ public Iterator iterator() {

public synchronized int size() {
int componentsize = fileStack.size() + ramStack.size() + sizeDomainStacks();
//assert componentsize == ramIndex.size() : "componentsize = " + componentsize + ", ramIndex.size() = " + ramIndex.size();
if (componentsize != ramIndex.size()) {
if ((kelondroRecords.debugmode) && (componentsize != ramIndex.size())) {
// hier ist ramIndex.size() immer grš§er. warum?
serverLog.logWarning("PLASMA BALANCER", "size operation wrong - componentsize = " + componentsize + ", ramIndex.size() = " + ramIndex.size());
}
return componentsize;
Expand Down Expand Up @@ -201,13 +202,13 @@ public synchronized void add(String urlhash) throws IOException {
domainList.add(urlhash);
}

// add to index
ramIndex.add(urlhash);

// check size of domainStacks and flush
if ((domainStacks.size() > 20) || (sizeDomainStacks() > 1000)) {
flushOnceDomStacks(false);
}

// add to index
ramIndex.add(urlhash);
}

public synchronized String get(long minimumDelta, long maximumAge) throws IOException {
Expand Down

0 comments on commit e3480d4

Please sign in to comment.