Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
some fixes to bring back lulabads peer.. see also: http://forum.yacy-websuche.de/viewtopic.php?p=4772#p4772
orbiterd372a78aeff6
diff --git a/source/de/anomic/kelondro/kelondroCollectionIndex.java b/source/de/anomic/kelondro/kelondroCollectionIndex.javaindex a0b0dc8bd..63c928ddd 100644--- a/source/de/anomic/kelondro/kelondroCollectionIndex.java+++ b/source/de/anomic/kelondro/kelondroCollectionIndex.java@@ -153,7 +153,7 @@ public class kelondroCollectionIndex {continue;}}- serverLog.logFine("STARTUP", "STARTED INITIALIZATION OF NEW COLLECTION INDEX WITH " + initialSpace + " ENTRIES. THIS WILL TAKE SOME TIME");+ serverLog.logFine("STARTUP", "STARTED INITIALIZATION OF NEW COLLECTION INDEX WITH " + initialSpace + " ENTRIES. THIS WILL TAKE SOME TIME. " + (serverMemory.available() / 1024 / 1024) + "MB AVAILABLE.");kelondroRow indexRowdef = indexRow(keyLength, indexOrder);long necessaryRAM4fullTable = minimumRAM4Eco + (indexRowdef.objectsize + 4) * initialSpace * 3 / 2;long necessaryRAM4fullIndex = minimumRAM4Eco + (indexRowdef.primaryKeyLength + 4) * initialSpace * 3 / 2;diff --git a/source/de/anomic/kelondro/kelondroEcoTable.java b/source/de/anomic/kelondro/kelondroEcoTable.javaindex d60d27dc2..cdca3fe33 100644--- a/source/de/anomic/kelondro/kelondroEcoTable.java+++ b/source/de/anomic/kelondro/kelondroEcoTable.java@@ -76,7 +76,7 @@ public class kelondroEcoTable implements kelondroIndex {for (int i = 0; i < cols.length; i++) {cols[i] = rowdef.column(i + 1);}- this.taildef = new kelondroRow(cols, kelondroNaturalOrder.naturalOrder, rowdef.primaryKeyIndex);+ this.taildef = new kelondroRow(cols, kelondroNaturalOrder.naturalOrder, -1);// initialize table fileif (!tablefile.exists()) {@@ -97,11 +97,12 @@ public class kelondroEcoTable implements kelondroIndex {// initialize index and copy tableint records = (int) Math.max(file.size(), initialSpace);- long neededRAM4table = 10 * 1024 * 1024 + records * (rowdef.objectsize + 4) * 3 / 2;+ long neededRAM4table = 200 * 1024 * 1024 + records * (rowdef.objectsize + 4) * 3 / 2;table = ((neededRAM4table < maxarraylength) &&((useTailCache == tailCacheForceUsage) ||- ((useTailCache == tailCacheUsageAuto) && (serverMemory.request(neededRAM4table, true))))) ?+ ((useTailCache == tailCacheUsageAuto) && (serverMemory.request(neededRAM4table, false))))) ?new kelondroRowSet(taildef, records) : null;+ System.out.println("*** DEBUG: available RAM: " + (serverMemory.available() / 1024 / 1024) + "MB, allocating space for " + records + " entries");index = new kelondroBytesIntMap(rowdef.primaryKeyLength, rowdef.objectOrder, records);System.out.println("*** DEBUG: EcoTable " + tablefile.toString() + " has table copy " + ((table == null) ? "DISABLED" : "ENABLED"));diff --git a/source/de/anomic/kelondro/kelondroRAMIndex.java b/source/de/anomic/kelondro/kelondroRAMIndex.javaindex 57061037c..93cb1d786 100644--- a/source/de/anomic/kelondro/kelondroRAMIndex.java+++ b/source/de/anomic/kelondro/kelondroRAMIndex.java@@ -48,6 +48,7 @@ public class kelondroRAMIndex implements kelondroIndex {}public void reset(int initialspace) {+ this.index0 = null; // first flush RAM to make roomthis.index0 = new kelondroRowSet(rowdef, initialspace);this.index1 = null; // to show that this is the initialization phase}