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
This commit is contained in:
orbiter 2007-03-14 15:04:06 +00:00
parent 81c4cc6bf7
commit 581db87237
2 changed files with 4 additions and 2 deletions

View File

@ -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);
}

View File

@ -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)");