Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
some bugfixes: - dht iterator start point - wordIndex synchronization - surftipps url check
orbiterb9add5cf3732
diff --git a/htroot/Surftips.java b/htroot/Surftips.javaindex 98370d7a0..10e4313bf 100644--- a/htroot/Surftips.java+++ b/htroot/Surftips.java@@ -226,6 +226,7 @@ public class Surftips {if (record.category().equals(yacyNewsPool.CATEGORY_PROFILE_UPDATE)) {url = record.attribute("homepage", "");+ if ((url == null) || (url.length() < 12)) continue;entry = rowdef.newEntry(new byte[][]{url.getBytes(),("Home Page of " + record.attribute("nickname", "")).getBytes("UTF-8"),diff --git a/source/de/anomic/plasma/plasmaDHTFlush.java b/source/de/anomic/plasma/plasmaDHTFlush.javaindex 48ed25801..dca80fab2 100644--- a/source/de/anomic/plasma/plasmaDHTFlush.java+++ b/source/de/anomic/plasma/plasmaDHTFlush.java@@ -153,7 +153,7 @@ public class plasmaDHTFlush extends Thread {public void performTransferWholeIndex() {plasmaDHTChunk newDHTChunk = null, oldDHTChunk = null;try {- // initial startingpoint of intex transfer is "------------"+ // initial startingpoint of intex transfer is "AAAAAAAAAAAA"this.log.logFine("Selected hash " + this.startPointHash + " as start point for index distribution of whole index");/* Loop until we have@@ -178,7 +178,7 @@ public class plasmaDHTFlush extends Thread {if (nothingSelected(newDHTChunk)) {if (this.sb.wordIndex.size() > 0 && this.delete) {// if there are still words in the index we try it again now- this.startPointHash = "------------";+ this.startPointHash = "AAAAAAAAAAAA";} else {// otherwise we could end transfer nowthis.log.logFine("No index available for index transfer, hash start-point " + this.startPointHash);diff --git a/source/de/anomic/plasma/plasmaWordIndex.java b/source/de/anomic/plasma/plasmaWordIndex.javaindex df7db109d..461120589 100644--- a/source/de/anomic/plasma/plasmaWordIndex.java+++ b/source/de/anomic/plasma/plasmaWordIndex.java@@ -199,12 +199,8 @@ public final class plasmaWordIndex implements indexRI {}public void flushCacheSome() {- synchronized (dhtOutCache) {- flushCache(dhtOutCache, (dhtOutCache.size() > 3 * flushsize) ? flushsize : Math.min(flushsize, Math.max(1, dhtOutCache.size() / lowcachedivisor)));- }- synchronized (dhtInCache) {- flushCache(dhtInCache, (dhtInCache.size() > 3 * flushsize) ? flushsize : Math.min(flushsize, Math.max(1, dhtInCache.size() / lowcachedivisor)));- }+ flushCache(dhtOutCache, (dhtOutCache.size() > 3 * flushsize) ? flushsize : Math.min(flushsize, Math.max(1, dhtOutCache.size() / lowcachedivisor)));+ flushCache(dhtInCache, (dhtInCache.size() > 3 * flushsize) ? flushsize : Math.min(flushsize, Math.max(1, dhtInCache.size() / lowcachedivisor)));}private void flushCache(indexRAMRI ram, int count) {@@ -214,7 +210,7 @@ public final class plasmaWordIndex implements indexRI {busyCacheFlush = true;String wordHash;ArrayList containerList = new ArrayList();- synchronized (this) {+ synchronized (ram) {boolean collectMax = true;indexContainer c;while (collectMax) {