Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ public boolean hasNext() throws QueryEvaluationException {
} catch (QueryEvaluationException e) {
throw e;
} catch (Exception e) {
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
throw new QueryEvaluationException(e);
}
}
Expand All @@ -75,9 +72,6 @@ public T next() throws QueryEvaluationException {
} catch (IllegalStateException | QueryEvaluationException e) {
throw e;
} catch (Exception e) {
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
throw new QueryEvaluationException(e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,20 @@
import java.nio.ByteBuffer;
import java.util.concurrent.locks.StampedLock;

import org.eclipse.rdf4j.sail.SailException;
import org.eclipse.rdf4j.sail.lmdb.TripleStore.TripleIndex;
import org.eclipse.rdf4j.sail.lmdb.TxnManager.Txn;
import org.eclipse.rdf4j.sail.lmdb.Varint.GroupMatcher;
import org.lwjgl.PointerBuffer;
import org.lwjgl.system.MemoryStack;
import org.lwjgl.util.lmdb.MDBVal;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* A record iterator that wraps a native LMDB iterator.
*/
class LmdbRecordIterator implements RecordIterator {
private static final Logger log = LoggerFactory.getLogger(LmdbRecordIterator.class);
private final Pool pool;

private final TripleIndex index;
Expand Down Expand Up @@ -126,6 +128,11 @@ class LmdbRecordIterator implements RecordIterator {
public long[] next() {
long stamp = txnLock.readLock();
try {
if (closed) {
log.debug("Calling next() on an LmdbRecordIterator that is already closed, returning null");
return null;
}

if (txnRefVersion != txnRef.version()) {
// cursor must be renewed
mdb_cursor_renew(txn, cursor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import static org.lwjgl.system.MemoryStack.stackPush;
import static org.lwjgl.system.MemoryUtil.NULL;
import static org.lwjgl.util.lmdb.LMDB.MDB_DBS_FULL;
import static org.lwjgl.util.lmdb.LMDB.MDB_KEYEXIST;
import static org.lwjgl.util.lmdb.LMDB.MDB_NOTFOUND;
import static org.lwjgl.util.lmdb.LMDB.MDB_RDONLY;
Expand All @@ -32,7 +31,6 @@
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.util.Comparator;
import java.util.concurrent.ConcurrentHashMap;

import org.lwjgl.PointerBuffer;
import org.lwjgl.system.MemoryStack;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import java.nio.file.Path;

import org.apache.commons.io.FileUtils;
import org.eclipse.rdf4j.sail.SailException;
import org.lwjgl.PointerBuffer;
import org.lwjgl.system.MemoryStack;
import org.lwjgl.util.lmdb.MDBStat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class QueryBenchmark {

public static void main(String[] args) throws RunnerException {
Options opt = new OptionsBuilder()
.include("QueryBenchmark") // adapt to run other benchmark tests
.include("QueryBenchmark.*") // adapt to run other benchmark tests
.forks(1)
.build();

Expand Down
Loading