mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
disabled some (more) write caches
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2987 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
09bcc10344
commit
10a4ab5195
|
@ -175,7 +175,7 @@ public class dbtest {
|
|||
kelondroRow testRow = new kelondroRow("byte[] key-" + keylength + ", byte[] dummy-" + keylength + ", value-" + valuelength);
|
||||
if (dbe.equals("kelondroTree")) {
|
||||
File tablefile = new File(tablename + ".kelondro.db");
|
||||
table = new kelondroCache(new kelondroTree(tablefile, buffer / 2, preload, testRow), buffer / 2, true, true);
|
||||
table = new kelondroCache(new kelondroTree(tablefile, buffer / 2, preload, testRow), buffer / 2, true, false);
|
||||
}
|
||||
if (dbe.equals("kelondroSplittedTree")) {
|
||||
File tablepath = new File(tablename).getParentFile();
|
||||
|
|
|
@ -91,7 +91,7 @@ public class kelondroMapTable {
|
|||
if (mTables.containsKey(tablename)) throw new RuntimeException("kelondroTables.declareTree: table '" + tablename + "' declared already in other context.");
|
||||
if (tTables.containsKey(tablename)) throw new RuntimeException("kelondroTables.declareTree: table '" + tablename + "' declared twice.");
|
||||
File tablefile = new File(tablesPath, "table." + tablename + ".tdb");
|
||||
kelondroIndex Tree = new kelondroCache(kelondroTree.open(tablefile, buffersize / 2, preloadTime, rowdef), buffersize / 2, true, true);
|
||||
kelondroIndex Tree = new kelondroCache(kelondroTree.open(tablefile, buffersize / 2, preloadTime, rowdef), buffersize / 2, true, false);
|
||||
tTables.put(tablename, Tree);
|
||||
}
|
||||
|
||||
|
|
|
@ -341,12 +341,12 @@ public class kelondroRowSet extends kelondroRowCollection implements kelondroInd
|
|||
private int p, bound;
|
||||
|
||||
public rowIterator(boolean up, boolean rotating, byte[] firstKey) {
|
||||
// see that all elements are sorted
|
||||
shape();
|
||||
this.up = up;
|
||||
this.rot = rotating;
|
||||
this.first = firstKey;
|
||||
this.bound = sortBound;
|
||||
// see that all elements are sorted
|
||||
shape();
|
||||
if (first == null) {
|
||||
p = 0;
|
||||
} else {
|
||||
|
|
|
@ -112,7 +112,7 @@ public final class plasmaWordIndexAssortment {
|
|||
this.log = log;
|
||||
// open assortment tree file
|
||||
long start = System.currentTimeMillis();
|
||||
assortments = new kelondroCache(kelondroTree.open(assortmentFile, bufferSize / 2, preloadTime, bufferStructure(assortmentLength)), bufferSize / 2, true, true);
|
||||
assortments = new kelondroCache(kelondroTree.open(assortmentFile, bufferSize / 2, preloadTime, bufferStructure(assortmentLength)), bufferSize / 2, true, false);
|
||||
long stop = System.currentTimeMillis();
|
||||
if (log != null) log.logConfig("Opened Assortment, " +
|
||||
assortments.size() + " entries, width " +
|
||||
|
@ -240,7 +240,7 @@ public final class plasmaWordIndexAssortment {
|
|||
assortmentFile.renameTo(backupFile);
|
||||
log.logInfo("a back-up of the deleted assortment file is in " + backupFile.toString());
|
||||
if (assortmentFile.exists()) assortmentFile.delete();
|
||||
assortments = new kelondroCache(kelondroTree.open(assortmentFile, bufferSize / 2, preloadTime, bufferStructure(assortmentLength)), bufferSize / 2, true, true);
|
||||
assortments = new kelondroCache(kelondroTree.open(assortmentFile, bufferSize / 2, preloadTime, bufferStructure(assortmentLength)), bufferSize / 2, true, false);
|
||||
} catch (Exception e) {
|
||||
// if this fails, delete the file
|
||||
if (!(assortmentFile.delete())) throw new RuntimeException("cannot delete assortment database");
|
||||
|
|
Loading…
Reference in New Issue
Block a user