Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
bugfix
orbiter4cc6e6551fef
diff --git a/htroot/PerformanceMemory_p.html b/htroot/PerformanceMemory_p.htmlindex 115eaeeb4..3ce205726 100644--- a/htroot/PerformanceMemory_p.html+++ b/htroot/PerformanceMemory_p.html@@ -338,7 +338,6 @@ Increasing this cache may speed up crawling, but not much space is needed, so th<td class="small" align="right">#[usedTotal]# MB</td><td class="small" align="right">#[currTotal]# MB</td><td class="small" align="right">#[dfltTotal]# MB</td>-<td class="small" align="right">#[goodTotal]# MB</td><td class="small" align="right">#[bestTotal]# MB</td><td class="small" align="left">Sum of memory amounts</td></tr>@@ -347,7 +346,6 @@ Increasing this cache may speed up crawling, but not much space is needed, so th<td class="small" align="right" colspan="11">Re-Configuration:</td><td class="small" align="center"><input type="submit" name="setCustom" value="Set"><br>these<br>custom<br>values<br> </td><td class="small" align="center"><input type="submit" name="setDefault" value="Set"><br>all<br>default<br>values<br> </td>-<td class="small" align="center"><input type="submit" name="setGood" value="Set"><br>all<br>recom-<br>mended values<br> </td><td class="small" align="center"><input type="submit" name="setBest" value="Set"><br>all<br>optimum<br>values<br> </td><td class="small" align="left">Changes take effect after <b>re-start</b> of YaCy</td></tr>diff --git a/source/de/anomic/kelondro/kelondroRecords.java b/source/de/anomic/kelondro/kelondroRecords.javaindex 1c1a4c7ad..a019618a4 100644--- a/source/de/anomic/kelondro/kelondroRecords.java+++ b/source/de/anomic/kelondro/kelondroRecords.java@@ -550,8 +550,6 @@ public class kelondroRecords {this.tailChunk = new byte[tailchunksize];for (int i = 0; i < headchunksize; i++) this.headChunk[i] = 0;for (int i = 0; i < tailchunksize; i++) this.tailChunk[i] = 0;- this.headChanged = true;- this.tailChanged = true;}private Node(Handle handle) throws IOException {@@ -608,7 +606,6 @@ public class kelondroRecords {//System.out.println("**NO CACHE for " + this.handle.index + "**");this.headChunk = new byte[headchunksize];entryFile.readFully(seekpos(this.handle), this.headChunk, 0, this.headChunk.length);- this.headChanged = false;} else synchronized(cacheHeaders) {byte[] cacheEntry = null;int cp = CP_HIGH;@@ -621,7 +618,7 @@ public class kelondroRecords {//this.tailChunk = new byte[tailchunksize];entryFile.readFully(seekpos(this.handle), this.headChunk, 0, this.headChunk.length);- this.headChanged = true; // provoke a cache store+ // calculate cache prioritycp = CP_HIGH;if (OHHANDLEC == 3) {Handle l = getOHHandle(1);@@ -629,6 +626,7 @@ public class kelondroRecords {if ((l == null) && (r == null)) cp = CP_LOW;else if ((l == null) || (r == null)) cp = CP_MEDIUM;}+// if space left in cache, copy these value to the cacheupdate2Cache(cp);} else {@@ -641,7 +639,6 @@ public class kelondroRecords {//this.headChunk = new byte[headchunksize];//System.arraycopy(cacheEntry, 0, this.headChunk, 0, headchunksize);this.headChunk = cacheEntry;- this.headChanged = false;}}}@@ -752,12 +749,14 @@ public class kelondroRecords {//System.out.println("WRITEH(" + filename + ", " + seekpos(this.handle) + ", " + this.headChunk.length + ")");entryFile.write(seekpos(this.handle), this.headChunk);update2Cache(cachePriority);+ this.headChanged = false;}// save tailif ((this.tailChunk != null) && (this.tailChanged)) {//System.out.println("WRITET(" + filename + ", " + (seekpos(this.handle) + headchunksize) + ", " + this.tailChunk.length + ")");entryFile.write(seekpos(this.handle) + headchunksize, this.tailChunk);+ this.tailChanged = false;}}@@ -837,7 +836,7 @@ public class kelondroRecords {// store the cache entryboolean upd = false;- cacheHeaders.putb(cacheHandle.index, headChunk);+ upd = (cacheHeaders.putb(cacheHandle.index, headChunk) != null);if (upd) writeDouble++; else writeUnique++;// delete the cache entry buffer