Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fixed problem with cache.profile() see also: http://www.yacy-forum.de/viewtopic.php?p=27109#27109
orbitereb4bfb0e9d58
diff --git a/source/de/anomic/kelondro/kelondroBufferedIndex.java b/source/de/anomic/kelondro/kelondroBufferedIndex.javaindex 11e87e6d1..f87cd82ff 100644--- a/source/de/anomic/kelondro/kelondroBufferedIndex.java+++ b/source/de/anomic/kelondro/kelondroBufferedIndex.java@@ -91,7 +91,7 @@ public class kelondroBufferedIndex implements kelondroIndex {}public synchronized kelondroRow.Entry get(byte[] key) throws IOException {- long handle = (index instanceof kelondroFlexSplitTable) ? -1 : index.profile().startRead();+ long handle = (index instanceof kelondroTree) ? index.profile().startRead() : -1;kelondroRow.Entry entry = null;entry = (kelondroRow.Entry) buffer.get(key);if (entry == null) entry = index.get(key);@@ -107,7 +107,7 @@ public class kelondroBufferedIndex implements kelondroIndex {assert (row != null);assert (row.getColBytes(index.primarykey()) != null);assert (!(serverLog.allZero(row.getColBytes(index.primarykey()))));- long handle = (index instanceof kelondroFlexSplitTable) ? -1 : index.profile().startWrite();+ long handle = (index instanceof kelondroTree) ? index.profile().startWrite() : -1;byte[] key = row.getColBytes(index.primarykey());kelondroRow.Entry oldentry = null;oldentry = (kelondroRow.Entry) buffer.get(key);@@ -156,7 +156,7 @@ public class kelondroBufferedIndex implements kelondroIndex {}public synchronized kelondroRow.Entry remove(byte[] key) throws IOException {- long handle = (index instanceof kelondroFlexSplitTable) ? -1 : index.profile().startDelete();+ long handle = (index instanceof kelondroTree) ? index.profile().startDelete() : -1;kelondroRow.Entry oldentry = null;oldentry = (kelondroRow.Entry) buffer.remove(key);if (oldentry == null) {@@ -168,7 +168,7 @@ public class kelondroBufferedIndex implements kelondroIndex {}public synchronized kelondroRow.Entry removeOne() throws IOException {- long handle = (index instanceof kelondroFlexSplitTable) ? -1 : index.profile().startDelete();+ long handle = (index instanceof kelondroTree) ? index.profile().startDelete() : -1;if (buffer.size() > 0) {byte[] key = (byte[]) buffer.keySet().iterator().next();kelondroRow.Entry entry = (kelondroRow.Entry) buffer.remove(key);diff --git a/source/de/anomic/kelondro/kelondroRecords.java b/source/de/anomic/kelondro/kelondroRecords.javaindex c7ef96541..c01f55a0d 100644--- a/source/de/anomic/kelondro/kelondroRecords.java+++ b/source/de/anomic/kelondro/kelondroRecords.java@@ -938,7 +938,7 @@ public class kelondroRecords {protected final long seekpos(Handle handle) {assert (handle.index >= 0): "handle index too low: " + handle.index;- assert (handle.index < USAGE.allCount()): "handle index too high:" + handle.index;+ //assert (handle.index < USAGE.allCount()): "handle index too high:" + handle.index;return POS_NODES + ((long) recordsize * handle.index);}@@ -1067,7 +1067,7 @@ public class kelondroRecords {seekp = seekpos(h);if (seekp > entryFile.length()) {// repair last hande store position- this.theLogger.severe("KELONDRO WARNING " + this.filename + ": seek position " + seekp + "/" + h.index + " out of file size " + entryFile.length() + "/" + ((entryFile.length() - POS_NODES) / recordsize) + " after " + iter + " iterations");+ this.theLogger.severe("KELONDRO WARNING " + this.filename + ": seek position " + seekp + "/" + h.index + " out of file size " + entryFile.length() + "/" + ((entryFile.length() - POS_NODES) / recordsize) + " after " + iter + " iterations; patched wrong node");entryFile.writeInt(repair_position, NUL);return markedDeleted;}