Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

*) it's now possible to run more then one indexDistribution-Thread

hydroxe2af2a3f45e4
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index f63d4a953..1dbbe5597 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -551,8 +551,11 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
(int)getConfigLong("indexDistribution.maxOpenFiles",800)*/
);
indexDistribution.setCounts(150, 1, 3, 10000);
- deployThread("20_dhtdistribution", "DHT Distribution", "selection, transfer and deletion of index entries that are not searched on your peer, but on others", null,
- new serverInstantThread(indexDistribution, "job", null), 60000);
+ getConfig("20_dhtdistribution_threads","1");
+ for(int i=0; i<(int)getConfigLong("20_dhtdistribution_threads",1);i++) {
+ deployThread("20_dhtdistribution_"+i, "DHT Distribution", "selection, transfer and deletion of index entries that are not searched on your peer, but on others", null,
+ new serverInstantThread(indexDistribution, "job", null), 60000 + i*5000);
+ }
// test routine for snippet fetch
//Set query = new HashSet();
diff --git a/source/de/anomic/plasma/plasmaWordIndexDistribution.java b/source/de/anomic/plasma/plasmaWordIndexDistribution.java
index 35cbb0750..873799174 100644
--- a/source/de/anomic/plasma/plasmaWordIndexDistribution.java
+++ b/source/de/anomic/plasma/plasmaWordIndexDistribution.java
@@ -440,7 +440,7 @@ public final class plasmaWordIndexDistribution {
}
}
- int deleteTransferIndexes(plasmaWordIndexEntryContainer[] indexContainers) {
+ synchronized int deleteTransferIndexes(plasmaWordIndexEntryContainer[] indexContainers) {
Iterator urlIter;
plasmaWordIndexEntry indexEntry;
String[] urlHashes;
diff --git a/yacy.init b/yacy.init
index e103079bb..34f4bae80 100644
--- a/yacy.init
+++ b/yacy.init
@@ -419,6 +419,7 @@ xpstopw=true
20_dhtdistribution_idlesleep=20000
20_dhtdistribution_busysleep=5000
20_dhtdistribution_memprereq=8388608
+20_dhtdistribution_threads=1
30_peerping_idlesleep=120000
30_peerping_busysleep=120000
30_peerping_memprereq=1048576