Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
just some comment lines
orbiter5a7fd6b4c849
diff --git a/source/de/anomic/kelondro/table/EcoTable.java b/source/de/anomic/kelondro/table/EcoTable.javaindex d44218e4e..22a8d9e26 100644--- a/source/de/anomic/kelondro/table/EcoTable.java+++ b/source/de/anomic/kelondro/table/EcoTable.java@@ -491,14 +491,20 @@ public class EcoTable implements ObjectIndex {assert i < index.size();if (table == null) {if (i == index.size() - 1) {+ // element is at last entry positionix = (int) index.remove(key);assert ix == i;file.cleanLast(b, 0);} else {+ // remove entry from indexassert i < index.size() - 1;ix = (int) index.remove(key);assert ix == i;++ // read element that shall be removedfile.get(i, b, 0);++ // fill the gap with value from last entry in filefile.cleanLast(p, 0);file.put(i, p, 0);final byte[] k = new byte[rowdef.primaryKeyLength];@@ -519,15 +525,20 @@ public class EcoTable implements ObjectIndex {table.removeRow(i, false);file.cleanLast();} else {- // switch values+ // remove entry from indexix = (int) index.remove(key);assert ix == i;-++ // switch values:+ // remove last entry from the file copy to fill it in the gapfinal Row.Entry te = table.removeOne();+ // fill the gap in file copytable.set(i, te);+ // move entry from last entry in file to gap positionfile.cleanLast(p, 0);file.put(i, p, 0);+ // set new index for moved entry in indexfinal Row.Entry lr = rowdef.newEntry(p);index.put(lr.getPrimaryKeyBytes(), i);}