debugging of kelondroRecords ... possibly synchronization bugs found

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1188 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent a1061495d4
commit 288b2c353e

@ -54,6 +54,7 @@ public class dbtest {
public STEntry(final long aSource) {
this.key = randomHash(aSource, aSource);
this.value = new byte[valuelength];
for (int i = 0; i < valuelength; i++) this.value[i] = 0;
final byte[] tempKey = String.valueOf(aSource).getBytes();
System.arraycopy(tempKey, 0, this.value, 0, tempKey.length);
}
@ -128,6 +129,7 @@ public class dbtest {
try {
final byte[][] entryBytes = getTable().get(entry.getKey());
if (entryBytes != null) {
System.out.println("ENTRY=" + new String(entryBytes[1]));
final STEntry dbEntry = new STEntry(entryBytes[0], entryBytes[1]);
if (!dbEntry.isValid()) {
System.out.println(dbEntry);
@ -139,7 +141,6 @@ public class dbtest {
System.err.println(e);
}
}
}
public static void main(String[] args) {

File diff suppressed because it is too large Load Diff

@ -133,7 +133,7 @@ public class kelondroTree extends kelondroRecords implements Comparator, kelondr
}
// Returns the value to which this map maps the specified key.
public synchronized byte[][] get(byte[] key) throws IOException {
public byte[][] get(byte[] key) throws IOException {
//System.out.println("kelondroTree.get " + new String(key) + " in " + filename);
Search search = new Search();
search.process(key);
@ -145,7 +145,7 @@ public class kelondroTree extends kelondroRecords implements Comparator, kelondr
}
}
public synchronized long[] getLong(byte[] key) throws IOException {
public long[] getLong(byte[] key) throws IOException {
byte[][] row = get(key);
long[] longs = new long[columns() - 1];
if (row == null) {
@ -1311,8 +1311,8 @@ public class kelondroTree extends kelondroRecords implements Comparator, kelondr
// Returns the comparator used to order this map,
// or null if this map uses its keys' natural order.
public synchronized Comparator comparator() {
return this;
public Comparator comparator() {
return this;
}
public static void main(String[] args) {

Loading…
Cancel
Save