Skip to content

Commit

Permalink
more logging in tranferURL to find OOM bug. See also
Browse files Browse the repository at this point in the history
  • Loading branch information
orbiter committed Sep 15, 2009
1 parent e627f75 commit 033554d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions htroot/yacy/transferURL.java
Expand Up @@ -73,10 +73,10 @@ public static serverObjects respond(final RequestHeader header, final serverObje
final String otherPeerName = iam + ":" + ((otherPeer == null) ? "NULL" : (otherPeer.getName() + "/" + otherPeer.getVersion()));

if ((youare == null) || (!youare.equals(sb.peers.mySeed().hash))) {
sb.getLog().logInfo("Rejecting URLs from peer " + otherPeerName + ". Wrong target. Wanted peer=" + youare + ", iam=" + sb.peers.mySeed().hash);
yacyCore.log.logInfo("Rejecting URLs from peer " + otherPeerName + ". Wrong target. Wanted peer=" + youare + ", iam=" + sb.peers.mySeed().hash);
result = "wrong_target";
} else if ((!granted) || (sb.isRobinsonMode())) {
sb.getLog().logInfo("Rejecting URLs from peer " + otherPeerName + ". Not granted.");
yacyCore.log.logInfo("Rejecting URLs from peer " + otherPeerName + ". Not granted.");
result = "error_not_granted";
} else {
int received = 0;
Expand Down Expand Up @@ -137,6 +137,7 @@ public static serverObjects respond(final RequestHeader header, final serverObje
}

// write entry to database
yacyCore.log.logInfo("Accepting URL " + i + "/" + urlc + " from peer " + otherPeerName + ": " + lEntry.metadata().url().toNormalform(true, false));
try {
sb.indexSegment.urlMetadata().store(lEntry);
sb.crawlResults.stack(lEntry, iam, iam, 3);
Expand All @@ -152,9 +153,9 @@ public static serverObjects respond(final RequestHeader header, final serverObje
// return rewrite properties
final int more = sb.indexSegment.urlMetadata().size() - sizeBefore;
doublevalues = Integer.toString(received - more);
sb.getLog().logInfo("Received " + received + " URLs from peer " + otherPeerName + " in " + (System.currentTimeMillis() - start) + " ms, blocked " + blocked + " URLs");
yacyCore.log.logInfo("Received " + received + " URLs from peer " + otherPeerName + " in " + (System.currentTimeMillis() - start) + " ms, blocked " + blocked + " URLs");
RSSFeed.channels(RSSFeed.INDEXRECEIVE).addMessage(new RSSMessage("Received " + received + " URLs from peer " + otherPeerName + ", blocked " + blocked, "", ""));
if ((received - more) > 0) sb.getLog().logSevere("Received " + doublevalues + " double URLs from peer " + otherPeerName);
if ((received - more) > 0) yacyCore.log.logSevere("Received " + doublevalues + " double URLs from peer " + otherPeerName);
result = "ok";
}

Expand Down

0 comments on commit 033554d

Please sign in to comment.