From 581db87237cb39e0cd0e0f812a07f8ef9e87d0c2 Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 14 Mar 2007 15:04:06 +0000 Subject: [PATCH] more debug code for http://www.yacy-forum.de/viewtopic.php?p=33009#33009 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3479 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/kelondro/kelondroRecords.java | 4 +++- source/de/anomic/plasma/plasmaCrawlNURL.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/kelondro/kelondroRecords.java b/source/de/anomic/kelondro/kelondroRecords.java index 18f6caaaa..036db078a 100644 --- a/source/de/anomic/kelondro/kelondroRecords.java +++ b/source/de/anomic/kelondro/kelondroRecords.java @@ -1451,9 +1451,11 @@ public class kelondroRecords { public Node next00() throws IOException { // see if the next record is in the bulk, and if not re-fill the bulk - if ((pos.index - bulkstart) >= bulksize) { + if (pos.index >= (bulkstart + bulksize)) { bulkstart = pos.index; int maxlength = Math.min(USAGE.allCount() - bulkstart, bulksize); + if ((POS_NODES + bulkstart * recordsize) < 0) + serverLog.logSevere("kelondroRecords", "DEBUG: negative offset. POS_NODES = " + POS_NODES + ", bulkstart = " + bulkstart + ", recordsize = " + recordsize); entryFile.readFully(POS_NODES + bulkstart * recordsize, bulk, 0, maxlength * recordsize); } diff --git a/source/de/anomic/plasma/plasmaCrawlNURL.java b/source/de/anomic/plasma/plasmaCrawlNURL.java index e12a90e83..a72b17dc7 100644 --- a/source/de/anomic/plasma/plasmaCrawlNURL.java +++ b/source/de/anomic/plasma/plasmaCrawlNURL.java @@ -429,7 +429,7 @@ public class plasmaCrawlNURL { try { entry = new Entry(hash); } catch (IOException e) { - serverLog.logSevere("NURL", e.getMessage(), e); + serverLog.logWarning("NURL", e.getMessage()); if (s > balancer.size()) continue; balancer.clear(); // the balancer is broken and cannot shrink throw new IOException("IO error, balancer cannot shrink: " + e.getMessage() + "; reset of balancer (2)");