loop detection and termination in deletedHandles method

see also: http://www.yacy-forum.de/viewtopic.php?p=26655#26655

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2754 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent 1c4076da8a
commit 130cc76927

@ -1049,6 +1049,11 @@ public class kelondroRecords {
Handle h = USAGE.FREEH;
while (h.index != NUL) {
//System.out.println("handle=0x" + Integer.toHexString(h.index));
if (markedDeleted.contains(h)) {
// loop detection
this.theLogger.severe("KELONDRO WARNING " + this.filename + ": FREE-Queue contains loops");
return markedDeleted;
}
markedDeleted.add(h);
seekp = seekpos(h);
if (seekp > entryFile.length()) throw new kelondroException("deletedHandles: seek position " + seekp + "/" + h.index + " out of file size " + entryFile.length() + "/" + ((entryFile.length() - POS_NODES) / recordsize));

Loading…
Cancel
Save