Author: orbiter Date: 2007-10-03 17:34:16 +0200 (Wed, 03 Oct 2007) New Revision: 4135
Modified: trunk/source/de/anomic/index/indexRAMRI.java trunk/source/de/anomic/plasma/plasmaWordIndex.java Log: fix for http://forum.yacy-websuche.de/viewtopic.php?f=6&t=394&p=2382#p2382 Modified: trunk/source/de/anomic/index/indexRAMRI.java =================================================================== --- trunk/source/de/anomic/index/indexRAMRI.java 2007-10-03 15:06:12 UTC (rev 4134) +++ trunk/source/de/anomic/index/indexRAMRI.java 2007-10-03 15:34:16 UTC (rev 4135) @@ -392,7 +392,8 @@ } public synchronized indexContainer getContainer(String wordHash, Set urlselection) { - + if (wordHash == null) return null; + // retrieve container indexContainer container = (indexContainer) cache.get(wordHash); Modified: trunk/source/de/anomic/plasma/plasmaWordIndex.java =================================================================== --- trunk/source/de/anomic/plasma/plasmaWordIndex.java 2007-10-03 15:06:12 UTC (rev 4134) +++ trunk/source/de/anomic/plasma/plasmaWordIndex.java 2007-10-03 15:34:16 UTC (rev 4135) @@ -192,13 +192,12 @@ } private void flushCache(indexRAMRI ram, int count) { - if (ram.size() <= count) count = ram.size(); - if (count <= 0) return; - if (count > 5000) count = 5000; busyCacheFlush = true; String wordHash; ArrayList containerList = new ArrayList(); synchronized (ram) { + count = Math.min(5000, Math.min(count, ram.size())); + if (count <= 0) return; boolean collectMax = true; indexContainer c; while (collectMax) { _______________________________________________ YaCy-svn mailing list [email protected] https://lists.berlios.de/mailman/listinfo/yacy-svn
