count errors before deleting collection.index

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5136 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
lotus 2008-09-10 16:40:20 +00:00
parent 0bb4fbc403
commit 383d89481e

View File

@ -66,6 +66,7 @@ public class plasmaDHTChunk {
private long selectionEndTime = 0;
private int transferFailedCounter = 0;
private int kelondroExceptionCounter = 0;
public indexContainer firstContainer() {
return indexContainers[0];
@ -270,7 +271,8 @@ public class plasmaDHTChunk {
indexContainers = new indexContainer[0];
urlCache = new HashMap<String, indexURLReference>();
this.status = chunkStatus_FAILED;
wordIndex.deleteIndexOnExit(); // delete index on exit for rebuild
kelondroExceptionCounter++;
if (kelondroExceptionCounter > 50) wordIndex.deleteIndexOnExit(); // delete index on exit for rebuild
return 0;
}
}