- deactivated all write buffers

- fixed a storage bug


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2933 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent ba967c4875
commit 1751a799ac

@ -3,7 +3,7 @@ javacSource=1.4
javacTarget=1.4 javacTarget=1.4
# Release Configuration # Release Configuration
releaseVersion=0.484 releaseVersion=0.485
releaseFile=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz releaseFile=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
#releaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz #releaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
releaseDir=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr} releaseDir=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}

@ -55,6 +55,7 @@ public class kelondroCache implements kelondroIndex {
private int hasnotHit, hasnotMiss, hasnotUnique, hasnotDouble, hasnotDelete, hasnotFlush; private int hasnotHit, hasnotMiss, hasnotUnique, hasnotDouble, hasnotDelete, hasnotFlush;
public kelondroCache(kelondroIndex backupIndex, long buffersize, boolean read, boolean write) throws IOException { public kelondroCache(kelondroIndex backupIndex, long buffersize, boolean read, boolean write) throws IOException {
assert write == false;
this.index = backupIndex; this.index = backupIndex;
this.keyrow = new kelondroRow(new kelondroColumn[]{index.row().column(index.primarykey())}); this.keyrow = new kelondroRow(new kelondroColumn[]{index.row().column(index.primarykey())});
this.readHitCache = (read) ? new kelondroRowSet(index.row()) : null; this.readHitCache = (read) ? new kelondroRowSet(index.row()) : null;

@ -81,7 +81,7 @@ public class kelondroDyn {
// creates or opens a dynamic tree // creates or opens a dynamic tree
rowdef = new kelondroRow("byte[] key-" + (key + counterlen) + ", byte[] node-" + nodesize); rowdef = new kelondroRow("byte[] key-" + (key + counterlen) + ", byte[] node-" + nodesize);
kelondroTree tree = new kelondroTree(file, buffersize / 2, preloadTime, rowdef, objectOrder, 1, 8); kelondroTree tree = new kelondroTree(file, buffersize / 2, preloadTime, rowdef, objectOrder, 1, 8);
this.index = new kelondroCache(tree, buffersize / 2, true, true); this.index = new kelondroCache(tree, buffersize / 2, true, false);
this.keylen = index.row().width(0) - counterlen; this.keylen = index.row().width(0) - counterlen;
this.reclen = index.row().width(1); this.reclen = index.row().width(1);
this.fillChar = fillChar; this.fillChar = fillChar;

@ -252,11 +252,11 @@ public class kelondroRow {
private void setCol(int encoding, int offset, int length, byte[] cell) { private void setCol(int encoding, int offset, int length, byte[] cell) {
if (cell == null) { if (cell == null) {
while (length-- >= 0) rowinstance[offset + length] = 0; while (length-- > 0) rowinstance[offset + length] = 0;
} else { } else {
if (cell.length < length) { if (cell.length < length) {
System.arraycopy(cell, 0, rowinstance, offset, cell.length); System.arraycopy(cell, 0, rowinstance, offset, cell.length);
while (length-- >= cell.length) rowinstance[offset + length] = 0; while (length-- > cell.length) rowinstance[offset + length] = 0;
} else { } else {
System.arraycopy(cell, 0, rowinstance, offset, length); System.arraycopy(cell, 0, rowinstance, offset, length);
} }

@ -87,6 +87,10 @@ public class kelondroRowCollection {
kelondroRow.Entry exportedCollection = exportRow(chunkcachelength).newEntry(exportedCollectionRowinstance); kelondroRow.Entry exportedCollection = exportRow(chunkcachelength).newEntry(exportedCollectionRowinstance);
this.chunkcount = (int) exportedCollection.getColLong(exp_chunkcount); this.chunkcount = (int) exportedCollection.getColLong(exp_chunkcount);
assert (this.chunkcount <= chunkcachelength / rowdef.objectsize) : "chunkcount = " + this.chunkcount + ", chunkcachelength = " + chunkcachelength + ", rowdef.objectsize = " + rowdef.objectsize; assert (this.chunkcount <= chunkcachelength / rowdef.objectsize) : "chunkcount = " + this.chunkcount + ", chunkcachelength = " + chunkcachelength + ", rowdef.objectsize = " + rowdef.objectsize;
if ((this.chunkcount > chunkcachelength / rowdef.objectsize)) {
serverLog.logWarning("RowCollection", "corrected wrong chunkcount; chunkcount = " + this.chunkcount + ", chunkcachelength = " + chunkcachelength + ", rowdef.objectsize = " + rowdef.objectsize);
this.chunkcount = chunkcachelength / rowdef.objectsize; // patch problem
}
this.lastTimeRead = (exportedCollection.getColLong(exp_last_read) + 10957) * day; this.lastTimeRead = (exportedCollection.getColLong(exp_last_read) + 10957) * day;
this.lastTimeWrote = (exportedCollection.getColLong(exp_last_wrote) + 10957) * day; this.lastTimeWrote = (exportedCollection.getColLong(exp_last_wrote) + 10957) * day;
String sortOrderKey = exportedCollection.getColString(exp_order_type, null); String sortOrderKey = exportedCollection.getColString(exp_order_type, null);

@ -157,7 +157,7 @@ public class plasmaCrawlNURL extends indexURL {
String newCacheName = "urlNotice4.table"; String newCacheName = "urlNotice4.table";
cacheStacksPath.mkdirs(); cacheStacksPath.mkdirs();
try { try {
urlIndexFile = new kelondroCache(new kelondroFlexTable(cacheStacksPath, newCacheName, bufferkb / 2 * 0x400, preloadTime, rowdef, kelondroBase64Order.enhancedCoder), bufferkb / 2 * 0x400, true, true); urlIndexFile = new kelondroCache(new kelondroFlexTable(cacheStacksPath, newCacheName, bufferkb / 2 * 0x400, preloadTime, rowdef, kelondroBase64Order.enhancedCoder), bufferkb / 2 * 0x400, true, false);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
System.exit(-1); System.exit(-1);

@ -688,7 +688,7 @@ public final class plasmaCrawlStacker {
String newCacheName = "urlPreNotice1.table"; String newCacheName = "urlPreNotice1.table";
cacheStacksPath.mkdirs(); cacheStacksPath.mkdirs();
try { try {
this.urlEntryCache = new kelondroCache(new kelondroFlexTable(cacheStacksPath, newCacheName, bufferkb / 2 * 0x400, preloadTime, plasmaCrawlNURL.rowdef, kelondroBase64Order.enhancedCoder), bufferkb / 2 * 0x400, true, true); this.urlEntryCache = new kelondroCache(new kelondroFlexTable(cacheStacksPath, newCacheName, bufferkb / 2 * 0x400, preloadTime, plasmaCrawlNURL.rowdef, kelondroBase64Order.enhancedCoder), bufferkb / 2 * 0x400, true, false);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
System.exit(-1); System.exit(-1);

@ -69,13 +69,13 @@ public class yacyNewsDB {
this.path = path; this.path = path;
this.bufferkb = bufferkb; this.bufferkb = bufferkb;
this.preloadTime = preloadTime; this.preloadTime = preloadTime;
this.news = new kelondroCache(kelondroTree.open(path, bufferkb / 2 * 0x400, preloadTime, yacyNewsRecord.rowdef), bufferkb / 2 * 0x400, true, true); this.news = new kelondroCache(kelondroTree.open(path, bufferkb / 2 * 0x400, preloadTime, yacyNewsRecord.rowdef), bufferkb / 2 * 0x400, true, false);
} }
private void resetDB() throws IOException { private void resetDB() throws IOException {
try {close();} catch (Exception e) {} try {close();} catch (Exception e) {}
if (path.exists()) path.delete(); if (path.exists()) path.delete();
this.news = new kelondroCache(kelondroTree.open(path, bufferkb / 2 * 0x400, preloadTime, yacyNewsRecord.rowdef), bufferkb / 2 * 0x400, true, true); this.news = new kelondroCache(kelondroTree.open(path, bufferkb / 2 * 0x400, preloadTime, yacyNewsRecord.rowdef), bufferkb / 2 * 0x400, true, false);
} }
public int cacheNodeChunkSize() { public int cacheNodeChunkSize() {

Loading…
Cancel
Save