From 0b2f67577e9703496f7541bfa5bb4c41905e5a8d Mon Sep 17 00:00:00 2001 From: lotus Date: Sun, 27 Jul 2008 18:53:51 +0000 Subject: [PATCH] Index Transfer: - fix for chunk size calculation - fix: if chunk size was 1, an infinite selection loop ran because no entries were found. if chunk size fails <=3 it will be set back to 500 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5023 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaDHTFlush.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/plasma/plasmaDHTFlush.java b/source/de/anomic/plasma/plasmaDHTFlush.java index 19f6f1b33..641d35a11 100644 --- a/source/de/anomic/plasma/plasmaDHTFlush.java +++ b/source/de/anomic/plasma/plasmaDHTFlush.java @@ -253,9 +253,11 @@ public class plasmaDHTFlush extends Thread { this.chunkSize-=100; } else if (selectionTime < transferTime){ this.chunkSize +=100; - } else if (selectionTime >= selectionTime && this.chunkSize>200){ + } else if (selectionTime >= transferTime && this.chunkSize>200){ this.chunkSize-=100; - } + } else if (this.chunkSize <= 3){ + this.chunkSize = 500; + } } private static boolean nothingSelected(plasmaDHTChunk newDHTChunk) {