Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
distinct keepOrder strategy, more discrete implementation of enhancement introduced in SVN 4158
orbiter7d57b805989f
diff --git a/source/dbtest.java b/source/dbtest.javaindex 104a0f524..bb94bcc3c 100644--- a/source/dbtest.java+++ b/source/dbtest.java@@ -140,7 +140,7 @@ public class dbtest {final STEntry entry = new STEntry(this.getSource());System.out.println("remove: " + serverLog.arrayList(entry.getKey(), 0, entry.getKey().length));try {- getTable().remove(entry.getKey());+ getTable().remove(entry.getKey(), false);} catch (IOException e) {System.err.println(e);e.printStackTrace();@@ -338,7 +338,7 @@ public class dbtest {start = System.currentTimeMillis();for (int i = 0; i < count; i++) {key = randomHash(random);- table.remove(key);+ table.remove(key, false);}remove = System.currentTimeMillis() - start;diff --git a/source/de/anomic/index/indexContainer.java b/source/de/anomic/index/indexContainer.javaindex 25820cc77..9ee1ec67f 100644--- a/source/de/anomic/index/indexContainer.java+++ b/source/de/anomic/index/indexContainer.java@@ -149,7 +149,7 @@ public class indexContainer extends kelondroRowSet {}public indexRWIEntry remove(String urlHash) {- kelondroRow.Entry entry = this.remove(urlHash.getBytes());+ kelondroRow.Entry entry = remove(urlHash.getBytes(), true);if (entry == null) return null;return new indexRWIEntry(entry);}@@ -384,7 +384,7 @@ public class indexContainer extends kelondroRowSet {if ((ie0 != null) && (ie1 != null)) {assert (ie0.urlHash().length() == keylength) : "ie0.urlHash() = " + ie0.urlHash();assert (ie1.urlHash().length() == keylength) : "ie1.urlHash() = " + ie1.urlHash();- if (iterate_pivot) se.remove(); pivot.remove(ie0.urlHash().getBytes());+ if (iterate_pivot) se.remove(); pivot.remove(ie0.urlHash().getBytes(), true);}}return pivot;diff --git a/source/de/anomic/kelondro/kelondroBytesIntMap.java b/source/de/anomic/kelondro/kelondroBytesIntMap.javaindex 0ee0bbc8a..80589339d 100644--- a/source/de/anomic/kelondro/kelondroBytesIntMap.java+++ b/source/de/anomic/kelondro/kelondroBytesIntMap.java@@ -145,9 +145,9 @@ public class kelondroBytesIntMap {//System.out.println("finished initialization phase at size = " + index0.size() + " in removei");}// if the new entry is within the initialization part, just overwrite it- kelondroRow.Entry indexentry = index0.remove(key);+ kelondroRow.Entry indexentry = index0.remove(key, true);if (indexentry != null) {- assert index0.remove(key) == null; // check if remove worked+ assert index0.remove(key, true) == null; // check if remove worked//assert consistencyAnalysis0() : "consistency problem: " + consistencyAnalysis();return (int) indexentry.getColLong(1);}@@ -156,9 +156,9 @@ public class kelondroBytesIntMap {// at this point index1 cannot be nullassert (index1 != null);if (index1.size() == 0) return -1;- kelondroRow.Entry indexentry = index1.remove(key);+ kelondroRow.Entry indexentry = index1.remove(key, true);if (indexentry == null) return -1;- assert index1.remove(key) == null; // check if remove worked+ assert index1.remove(key, true) == null; // check if remove worked//assert consistencyAnalysis0() : "consistency problem: " + consistencyAnalysis();return (int) indexentry.getColLong(1);}diff --git a/source/de/anomic/kelondro/kelondroCache.java b/source/de/anomic/kelondro/kelondroCache.javaindex 05293398e..35b1d0c0a 100644--- a/source/de/anomic/kelondro/kelondroCache.java+++ b/source/de/anomic/kelondro/kelondroCache.java@@ -190,7 +190,7 @@ public class kelondroCache implements kelondroIndex {}i = delete.rows();while (i.hasNext()) {- writeBufferUnique.remove(((kelondroRow.Entry) i.next()).getColBytes(0));+ writeBufferUnique.remove(((kelondroRow.Entry) i.next()).getColBytes(0), true);}delete = null;writeBufferUnique.trim(true);@@ -223,7 +223,7 @@ public class kelondroCache implements kelondroIndex {this.cacheFlush++;}i = delete.rows();- while (i.hasNext()) writeBufferDoubles.remove(((kelondroRow.Entry) i.next()).getColBytes(0));+ while (i.hasNext()) writeBufferDoubles.remove(((kelondroRow.Entry) i.next()).getColBytes(0), true);delete = null;writeBufferDoubles.trim(true);}@@ -369,7 +369,7 @@ public class kelondroCache implements kelondroIndex {// remove entry from miss- and hit-cacheif (readMissCache != null) {- if (readMissCache.remove(key) != null) {+ if (readMissCache.remove(key, true) != null) {this.hasnotHit++;// the entry does not exist beforeif (writeBufferUnique != null) {@@ -396,7 +396,7 @@ public class kelondroCache implements kelondroIndex {// since we know that the entry was in the read cache, it cannot be in any write cacheif (writeBufferDoubles != null) {// because the entry exists, it must be written in the doubles buffer- readHitCache.remove(key);+ readHitCache.remove(key, true);this.cacheDelete++;writeBufferDoubles.put(row);return entry;@@ -467,7 +467,7 @@ public class kelondroCache implements kelondroIndex {// remove entry from miss- and hit-cacheif (readMissCache != null) {- this.readMissCache.remove(key);+ this.readMissCache.remove(key, true);this.hasnotDelete++;// the entry does not exist beforeif (writeBufferUnique != null) {@@ -519,7 +519,7 @@ public class kelondroCache implements kelondroIndex {// remove entry from miss- and hit-cacheif (readMissCache != null) {- this.readMissCache.remove(key);+ this.readMissCache.remove(key, true);this.hasnotDelete++;}@@ -536,8 +536,7 @@ public class kelondroCache implements kelondroIndex {while (i.hasNext()) addUnique((Entry) i.next());}- public synchronized Entry remove(byte[] key) throws IOException {-+ public synchronized Entry remove(byte[] key, boolean keepOrder) throws IOException {checkMissSpace();// add entry to miss-cache@@ -554,7 +553,7 @@ public class kelondroCache implements kelondroIndex {// remove entry from hit-cacheif (readHitCache != null) {- Entry entry = readHitCache.remove(key);+ Entry entry = readHitCache.remove(key, true);if (entry == null) {this.readMiss++;} else {@@ -565,18 +564,18 @@ public class kelondroCache implements kelondroIndex {// if the key already exists in one buffer, remove that bufferif (writeBufferUnique != null) {- Entry entry = writeBufferUnique.remove(key);+ Entry entry = writeBufferUnique.remove(key, true);if (entry != null) return entry;}if (writeBufferDoubles != null) {- Entry entry = writeBufferDoubles.remove(key);+ Entry entry = writeBufferDoubles.remove(key, true);if (entry != null) {- index.remove(key);+ index.remove(key, false);return entry;}}- return index.remove(key);+ return index.remove(key, false);}public synchronized Entry removeOne() throws IOException {@@ -599,7 +598,7 @@ public class kelondroCache implements kelondroIndex {kelondroRow.Entry dummy = readMissCache.put(readMissCache.row().newEntry(key));if (dummy == null) this.hasnotUnique++; else this.hasnotDouble++;}- index.remove(key);+ index.remove(key, false);return entry;}@@ -611,7 +610,7 @@ public class kelondroCache implements kelondroIndex {if (dummy == null) this.hasnotUnique++; else this.hasnotDouble++;}if (readHitCache != null) {- kelondroRow.Entry dummy = readHitCache.remove(key);+ kelondroRow.Entry dummy = readHitCache.remove(key, true);if (dummy != null) this.cacheDelete++;}return entry;diff --git a/source/de/anomic/kelondro/kelondroCollectionIndex.java b/source/de/anomic/kelondro/kelondroCollectionIndex.javaindex 4e5b6576d..b404459f6 100644--- a/source/de/anomic/kelondro/kelondroCollectionIndex.java+++ b/source/de/anomic/kelondro/kelondroCollectionIndex.java@@ -835,8 +835,8 @@ public class kelondroCollectionIndex {Object k;while (i.hasNext()) {k = i.next();- if ((k instanceof byte[]) && (oldcollection.remove((byte[]) k) != null)) removed++;- if ((k instanceof String) && (oldcollection.remove(((String) k).getBytes()) != null)) removed++;+ if ((k instanceof byte[]) && (oldcollection.remove((byte[]) k, false) != null)) removed++;+ if ((k instanceof String) && (oldcollection.remove(((String) k).getBytes(), false) != null)) removed++;}oldcollection.sort();oldcollection.trim(false);@@ -893,7 +893,7 @@ public class kelondroCollectionIndex {public synchronized kelondroRowSet delete(byte[] key) throws IOException {// find an entry, if one exists- kelondroRow.Entry indexrow = index.remove(key);+ kelondroRow.Entry indexrow = index.remove(key, false);if (indexrow == null) return null;kelondroRowSet removedCollection = getdelete(indexrow, true);assert (removedCollection != null);@@ -925,7 +925,7 @@ public class kelondroCollectionIndex {byte[] arraykey = arrayrow.getColBytes(0);if (!(index.row().objectOrder.wellformed(arraykey))) {// cleanup for a bad bug that corrupted the database- index.remove(indexkey); // the RowCollection must be considered lost+ index.remove(indexkey, false); // the RowCollection must be considered lostarray.remove(rownumber); // loose the RowCollection (we don't know how much is lost)serverLog.logSevere("kelondroCollectionIndex." + array.filename, "lost a RowCollection because of a bad arraykey");return new kelondroRowSet(this.payloadrow, 0);@@ -933,7 +933,7 @@ public class kelondroCollectionIndex {kelondroRowSet collection = new kelondroRowSet(this.payloadrow, arrayrow, 1); // FIXME: this does not yet work with different rowdef in case of several rowdef.objectsize()if ((!(index.row().objectOrder.wellformed(indexkey))) || (index.row().objectOrder.compare(arraykey, indexkey) != 0)) {// check if we got the right row; this row is wrong. Fix it:- index.remove(indexkey); // the wrong row cannot be fixed+ index.remove(indexkey, true); // the wrong row cannot be fixed// store the row number in the index; this may be a double-entry, but better than nothingkelondroRow.Entry indexEntry = index.row().newEntry();indexEntry.setCol(idx_col_key, arrayrow.getColBytes(0));diff --git a/source/de/anomic/kelondro/kelondroDyn.java b/source/de/anomic/kelondro/kelondroDyn.javaindex 618ee22f0..9407e96f1 100644--- a/source/de/anomic/kelondro/kelondroDyn.java+++ b/source/de/anomic/kelondro/kelondroDyn.java@@ -332,7 +332,7 @@ public class kelondroDyn {int recpos = 0;byte[] k;while (index.get(k = dynKey(key, recpos)) != null) {- index.remove(k);+ index.remove(k, true);buffer.remove(k);recpos++;}diff --git a/source/de/anomic/kelondro/kelondroFlexSplitTable.java b/source/de/anomic/kelondro/kelondroFlexSplitTable.javaindex 73f60d258..6b43849e7 100644--- a/source/de/anomic/kelondro/kelondroFlexSplitTable.java+++ b/source/de/anomic/kelondro/kelondroFlexSplitTable.java@@ -260,13 +260,13 @@ public class kelondroFlexSplitTable implements kelondroIndex {while (i.hasNext()) addUnique((kelondroRow.Entry) i.next(), entryDate);}- public synchronized kelondroRow.Entry remove(byte[] key) throws IOException {+ public synchronized kelondroRow.Entry remove(byte[] key, boolean keepOrder) throws IOException {Iterator i = tables.values().iterator();kelondroIndex table;kelondroRow.Entry entry;while (i.hasNext()) {table = (kelondroIndex) i.next();- entry = table.remove(key);+ entry = table.remove(key, keepOrder);if (entry != null) return entry;}return null;diff --git a/source/de/anomic/kelondro/kelondroFlexTable.java b/source/de/anomic/kelondro/kelondroFlexTable.javaindex 4ac282a89..c0bb3c604 100644--- a/source/de/anomic/kelondro/kelondroFlexTable.java+++ b/source/de/anomic/kelondro/kelondroFlexTable.java@@ -311,7 +311,8 @@ public class kelondroFlexTable extends kelondroFlexWidthArray implements kelondr}- public synchronized kelondroRow.Entry remove(byte[] key) throws IOException {+ public synchronized kelondroRow.Entry remove(byte[] key, boolean keepOrder) throws IOException {+ assert keepOrder == false; // the underlying data structure is a file, where the order cannot be maintained. Gaps are filled with new values.int i = index.removei(key);assert (index.geti(key) < 0); // must be deletedif (i < 0) {diff --git a/source/de/anomic/kelondro/kelondroIndex.java b/source/de/anomic/kelondro/kelondroIndex.javaindex c04082321..46ae806ec 100644--- a/source/de/anomic/kelondro/kelondroIndex.java+++ b/source/de/anomic/kelondro/kelondroIndex.java@@ -67,7 +67,7 @@ public interface kelondroIndex {public void putMultiple(List /* of kelondroRow.Entry*/ rows) throws IOException; // for R/W head path optimizationpublic void addUnique(kelondroRow.Entry row) throws IOException; // no double-checkpublic void addUniqueMultiple(List /* of kelondroRow.Entry*/ rows) throws IOException; // no double-check- public kelondroRow.Entry remove(byte[] key) throws IOException;+ public kelondroRow.Entry remove(byte[] key, boolean keepOrder) throws IOException;public kelondroRow.Entry removeOne() throws IOException;public kelondroCloneableIterator rows(boolean up, byte[] firstKey) throws IOException;public void close();diff --git a/source/de/anomic/kelondro/kelondroIntBytesMap.java b/source/de/anomic/kelondro/kelondroIntBytesMap.javaindex 614c3e7ce..b552fbc77 100644--- a/source/de/anomic/kelondro/kelondroIntBytesMap.java+++ b/source/de/anomic/kelondro/kelondroIntBytesMap.java@@ -130,7 +130,7 @@ public class kelondroIntBytesMap {index0.uniq(10000);index1 = new kelondroRowSet(rowdef, 0);}- kelondroRow.Entry indexentry = index0.remove(key);+ kelondroRow.Entry indexentry = index0.remove(key, true);if (indexentry != null) {return indexentry.getColBytes(1);}@@ -139,7 +139,7 @@ public class kelondroIntBytesMap {// at this point index1 cannot be nullassert (index1 != null);if (index1.size() == 0) return null;- kelondroRow.Entry indexentry = index1.remove(key);+ kelondroRow.Entry indexentry = index1.remove(key, true);if (indexentry == null) return null;return indexentry.getColBytes(1);}diff --git a/source/de/anomic/kelondro/kelondroMapTable.java b/source/de/anomic/kelondro/kelondroMapTable.javaindex dba49ea11..802ac9dcb 100644--- a/source/de/anomic/kelondro/kelondroMapTable.java+++ b/source/de/anomic/kelondro/kelondroMapTable.java@@ -156,7 +156,7 @@ public class kelondroMapTable {if (table != null) {table.remove(key); mTables.put(tablename, table); return;}kelondroIndex Tree = (kelondroIndex) tTables.get(tablename);- if (Tree != null) {Tree.remove(key.getBytes()); tTables.put(tablename, Tree); return;}+ if (Tree != null) {Tree.remove(key.getBytes(), false); tTables.put(tablename, Tree); return;}throw new RuntimeException("kelondroTables.delete: table '" + tablename + "' does not exist.");}diff --git a/source/de/anomic/kelondro/kelondroRowSet.java b/source/de/anomic/kelondro/kelondroRowSet.javaindex 487b32314..7b281c431 100644--- a/source/de/anomic/kelondro/kelondroRowSet.java+++ b/source/de/anomic/kelondro/kelondroRowSet.java@@ -119,12 +119,12 @@ public class kelondroRowSet extends kelondroRowCollection implements kelondroIndreturn oldentry;}- private synchronized kelondroRow.Entry remove(byte[] a, int start, int length) {+ private synchronized kelondroRow.Entry remove(byte[] a, int start, int length, boolean keepOrder) {int index = find(a, start, length);if (index < 0) return null;//System.out.println("remove: chunk found at index position (before remove) " + index + ", inset=" + serverLog.arrayList(super.chunkcache, super.rowdef.objectsize() * index, length + 10) + ", searchkey=" + serverLog.arrayList(a, start, length));kelondroRow.Entry entry = super.get(index);- super.removeRow(index, false);+ super.removeRow(index, keepOrder);//System.out.println("remove: chunk found at index position (after remove) " + index + ", inset=" + serverLog.arrayList(super.chunkcache, super.rowdef.objectsize() * index, length) + ", searchkey=" + serverLog.arrayList(a, start, length));int findagainindex = find(a, start, length);//System.out.println("kelondroRowSet.remove");@@ -132,8 +132,8 @@ public class kelondroRowSet extends kelondroRowCollection implements kelondroIndreturn entry;}- public kelondroRow.Entry remove(byte[] a) {- return remove(a, 0, a.length);+ public kelondroRow.Entry remove(byte[] a, boolean keepOrder) {+ return remove(a, 0, a.length, keepOrder);}private int find(byte[] a, int astart, int alength) {@@ -293,7 +293,7 @@ public class kelondroRowSet extends kelondroRowCollection implements kelondroIndfor (int ii = 0; ii < test.length; ii++) d.add(test[ii].getBytes());for (int ii = 0; ii < test.length; ii++) d.add(test[ii].getBytes());d.sort();- d.remove("fuenf".getBytes(), 0, 5);+ d.remove("fuenf".getBytes(), 0, 5, false);Iterator ii = d.rows();String s;System.out.print("INPUT-ITERATOR: ");@@ -391,11 +391,11 @@ public class kelondroRowSet extends kelondroRowCollection implements kelondroIndkey = randomHash(random);c.put(c.rowdef.newEntry(new byte[][]{key, key}));if (i % 1000 == 0) {- for (int j = 0; j < delkeys.length; j++) c.remove(delkeys[j]);+ for (int j = 0; j < delkeys.length; j++) c.remove(delkeys[j], true);c.sort();}}- for (int j = 0; j < delkeys.length; j++) c.remove(delkeys[j]);+ for (int j = 0; j < delkeys.length; j++) c.remove(delkeys[j], true);c.sort();random = new Random(0);for (int i = 0; i < testsize; i++) {diff --git a/source/de/anomic/kelondro/kelondroSQLTable.java b/source/de/anomic/kelondro/kelondroSQLTable.javaindex cd5d17987..f405c1f61 100644--- a/source/de/anomic/kelondro/kelondroSQLTable.java+++ b/source/de/anomic/kelondro/kelondroSQLTable.java@@ -179,7 +179,7 @@ public class kelondroSQLTable implements kelondroIndex {public kelondroRow.Entry put(kelondroRow.Entry row) throws IOException {try {- kelondroRow.Entry oldEntry = remove(row.getColBytes(0));+ kelondroRow.Entry oldEntry = remove(row.getColBytes(0), false);String sqlQuery = new String(@@ -216,7 +216,7 @@ public class kelondroSQLTable implements kelondroIndex {throw new UnsupportedOperationException();}- public kelondroRow.Entry remove(byte[] key) throws IOException {+ public kelondroRow.Entry remove(byte[] key, boolean keepOrder) throws IOException {try {kelondroRow.Entry entry = this.get(key);diff --git a/source/de/anomic/kelondro/kelondroSplittedTree.java b/source/de/anomic/kelondro/kelondroSplittedTree.javaindex 5d7e96adb..d0ef7b2a8 100644--- a/source/de/anomic/kelondro/kelondroSplittedTree.java+++ b/source/de/anomic/kelondro/kelondroSplittedTree.java@@ -150,8 +150,8 @@ public class kelondroSplittedTree implements kelondroIndex {return ktfs[partition(row.getColBytes(0))].put(row);}- public kelondroRow.Entry remove(byte[] key) throws IOException {- return ktfs[partition(key)].remove(key);+ public kelondroRow.Entry remove(byte[] key, boolean keepOrder) throws IOException {+ return ktfs[partition(key)].remove(key, keepOrder);}public kelondroRow.Entry removeOne() throws IOException {diff --git a/source/de/anomic/kelondro/kelondroTree.java b/source/de/anomic/kelondro/kelondroTree.javaindex 7fd077106..8dbc47f9b 100644--- a/source/de/anomic/kelondro/kelondroTree.java+++ b/source/de/anomic/kelondro/kelondroTree.java@@ -618,7 +618,10 @@ public class kelondroTree extends kelondroCachedRecords implements kelondroIndex}// Removes the mapping for this key from this map if present (optional operation).- public kelondroRow.Entry remove(byte[] key) throws IOException {+ public kelondroRow.Entry remove(byte[] key, boolean keepOrder) throws IOException {+ // keepOrder cannot have any effect: the order inside the database file cannot be maintained, but iteration over objects will always maintain the object order+ // therefore keepOrder should be true, because the effect is always given, while the data structure does not maintain order+ assert keepOrder == true;// delete from databasesynchronized(writeSearchObj) {writeSearchObj.process(key);@@ -1090,7 +1093,7 @@ public class kelondroTree extends kelondroCachedRecords implements kelondroIndexpublic void remove() {if (lastKey != null) try {- kelondroTree.this.remove(lastKey);+ kelondroTree.this.remove(lastKey, true);} catch (IOException e) {// do nothing}@@ -1241,9 +1244,9 @@ public class kelondroTree extends kelondroCachedRecords implements kelondroIndexfm.put("abc3".getBytes(), dummy); fm.put("bcd3".getBytes(), dummy);fm.put("def3".getBytes(), dummy); fm.put("bab3".getBytes(), dummy);fm.print();- fm.remove("def1".getBytes()); fm.remove("bab1".getBytes());- fm.remove("abc2".getBytes()); fm.remove("bcd2".getBytes());- fm.remove("def2".getBytes()); fm.remove("bab2".getBytes());+ fm.remove("def1".getBytes(), true); fm.remove("bab1".getBytes(), true);+ fm.remove("abc2".getBytes(), true); fm.remove("bcd2".getBytes(), true);+ fm.remove("def2".getBytes(), true); fm.remove("bab2".getBytes(), true);fm.put("def1".getBytes(), dummy); fm.put("bab1".getBytes(), dummy);fm.put("abc2".getBytes(), dummy); fm.put("bcd2".getBytes(), dummy);fm.put("def2".getBytes(), dummy); fm.put("bab2".getBytes(), dummy);@@ -1261,7 +1264,7 @@ public class kelondroTree extends kelondroCachedRecords implements kelondroIndex} else if (args.length == 3) {if (args[0].equals("-d")) {kelondroTree fm = new kelondroTree(new File(args[1]), true, 10, new kelondroRow("byte[] a-4, byte[] b-4", kelondroNaturalOrder.naturalOrder, 0));- fm.remove(args[2].getBytes());+ fm.remove(args[2].getBytes(), true);fm.close();} else if (args[0].equals("-i")) {kelondroTree fm = new kelondroTree(new File(args[1]), true, 10, new kelondroRow("byte[] a-4, byte[] b-4", kelondroNaturalOrder.naturalOrder, 0));@@ -1386,7 +1389,7 @@ public class kelondroTree extends kelondroCachedRecords implements kelondroIndex// delete onec = d.charAt((int) (System.currentTimeMillis() % d.length()));b = testWord(c);- tt.remove(b);+ tt.remove(b, true);d = d.substring(0, d.indexOf(c)) + d.substring(d.indexOf(c) + 1);t = t + c;System.out.println("removed " + new String(b));@@ -1440,8 +1443,8 @@ public class kelondroTree extends kelondroCachedRecords implements kelondroIndexb = testWord('C'); tt.put(b, b); //tt.print();b = testWord('D'); tt.put(b, b); //tt.print();b = testWord('A'); tt.put(b, b); //tt.print();- b = testWord('D'); tt.remove(b); //tt.print();- b = testWord('B'); tt.remove(b); //tt.print();+ b = testWord('D'); tt.remove(b, true); //tt.print();+ b = testWord('B'); tt.remove(b, true); //tt.print();b = testWord('B'); tt.put(b, b); //tt.print();b = testWord('D'); tt.put(b, b);b = testWord('E'); tt.put(b, b);@@ -1530,7 +1533,7 @@ public class kelondroTree extends kelondroCachedRecords implements kelondroIndex//tt.print();// delete by permutation jfor (int elt = 0; elt < s[j].length(); elt++) {- tt.remove(testWord(s[j].charAt(elt)));+ tt.remove(testWord(s[j].charAt(elt)), true);//tt.print();if (countElements(tt) != tt.size()) {System.out.println("ERROR! wrong size for probe tree " + s[i] + "; probe delete " + s[j] + "; position " + elt);diff --git a/source/de/anomic/plasma/plasmaCrawlBalancer.java b/source/de/anomic/plasma/plasmaCrawlBalancer.javaindex ecfff03ff..078f2222a 100644--- a/source/de/anomic/plasma/plasmaCrawlBalancer.java+++ b/source/de/anomic/plasma/plasmaCrawlBalancer.java@@ -171,7 +171,7 @@ public class plasmaCrawlBalancer {// and it was implemented in the previous architecture// however, usage is not recommendetint s = urlFileIndex.size();- kelondroRow.Entry entry = urlFileIndex.remove(urlhash.getBytes());+ kelondroRow.Entry entry = urlFileIndex.remove(urlhash.getBytes(), false);if (entry == null) return null;assert urlFileIndex.size() + 1 == s : "urlFileIndex.size() = " + urlFileIndex.size() + ", s = " + s;@@ -446,7 +446,7 @@ public class plasmaCrawlBalancer {long delta = lastAccessDelta(result);assert delta >= 0: "delta = " + delta;int s = urlFileIndex.size();- kelondroRow.Entry rowEntry = urlFileIndex.remove(result.getBytes());+ kelondroRow.Entry rowEntry = urlFileIndex.remove(result.getBytes(), false);assert urlFileIndex.size() + 1 == s : "urlFileIndex.size() = " + urlFileIndex.size() + ", s = " + s + ", result = " + result;if (rowEntry == null) {serverLog.logSevere("PLASMA BALANCER", "get() found a valid urlhash, but failed to fetch the corresponding url entry - total size = " + size() + ", fileStack.size() = " + urlFileStack.size() + ", ramStack.size() = " + urlRAMStack.size() + ", domainStacks.size() = " + domainStacks.size());diff --git a/source/de/anomic/plasma/plasmaCrawlLURL.java b/source/de/anomic/plasma/plasmaCrawlLURL.javaindex 1c00e7194..fca8a0b0f 100644--- a/source/de/anomic/plasma/plasmaCrawlLURL.java+++ b/source/de/anomic/plasma/plasmaCrawlLURL.java@@ -281,7 +281,7 @@ public final class plasmaCrawlLURL {public synchronized boolean remove(String urlHash) {if (urlHash == null) return false;try {- kelondroRow.Entry r = urlIndexFile.remove(urlHash.getBytes());+ kelondroRow.Entry r = urlIndexFile.remove(urlHash.getBytes(), false);if (r == null) return false;for (int stack = 1; stack <= 6; stack++) {for (int i = getStackSize(stack) - 1; i >= 0; i--) {diff --git a/source/de/anomic/plasma/plasmaCrawlStacker.java b/source/de/anomic/plasma/plasmaCrawlStacker.javaindex 7c939010e..a95b30c9a 100644--- a/source/de/anomic/plasma/plasmaCrawlStacker.java+++ b/source/de/anomic/plasma/plasmaCrawlStacker.java@@ -584,7 +584,7 @@ public final class plasmaCrawlStacker {synchronized(this.urlEntryHashCache) {urlHash = (String) this.urlEntryHashCache.removeFirst();if (urlHash == null) throw new IOException("urlHash is null");- entry = this.urlEntryCache.remove(urlHash.getBytes());+ entry = this.urlEntryCache.remove(urlHash.getBytes(), false);}} finally {this.writeSync.V();diff --git a/source/de/anomic/plasma/plasmaCrawlZURL.java b/source/de/anomic/plasma/plasmaCrawlZURL.javaindex 4f4a3d79e..63a28ae87 100644--- a/source/de/anomic/plasma/plasmaCrawlZURL.java+++ b/source/de/anomic/plasma/plasmaCrawlZURL.java@@ -95,7 +95,7 @@ public class plasmaCrawlZURL {public boolean remove(String hash) {if (hash == null) return false;try {- urlIndexFile.remove(hash.getBytes());+ urlIndexFile.remove(hash.getBytes(), false);return true;} catch (IOException e) {return false;diff --git a/source/de/anomic/yacy/yacyNewsDB.java b/source/de/anomic/yacy/yacyNewsDB.javaindex 1e8c4690d..658990f9b 100644--- a/source/de/anomic/yacy/yacyNewsDB.java+++ b/source/de/anomic/yacy/yacyNewsDB.java@@ -90,7 +90,7 @@ public class yacyNewsDB {}public void remove(String id) throws IOException {- news.remove(id.getBytes());+ news.remove(id.getBytes(), false);}public synchronized yacyNewsRecord put(yacyNewsRecord record) throws IOException {