-
Notifications
You must be signed in to change notification settings - Fork 427
Open
Description
Hello,
I have followed the documentation and there is limited information on how to use Snapshots in other methods and classes. When I open a database instance, take a snapshot, then export it to a new method, the entire JVM crashes which I have never seen before:
A fatal error has been detected by the Java Runtime Environment:
Here is how I am grabbing the Snapshot:
public synchronized DBIterator getSnapShot() throws IOException {
ReadOptions options = new ReadOptions();
DBIterator iterator = null;
try {
setLinkPacDatabase(factory.open(new File(Finals.LINKPACDB_FILEPATH), setupLevelDbOptions(true, false)));
options.snapshot(getLinkPacDatabase().getSnapshot());
iterator = getLinkPacDatabase().iterator(options);
} catch (Exception e) {
e.printStackTrace();
} finally {
getLinkPacDatabase().close();
}
return iterator;
}
But when I try to iterate the Snapshot like below in other classes, the JVM crashes:
for (iterator.seekToFirst(); iterator.hasNext(); iterator.next()) {
What is the correct way to take a Snapshot of the database and use it elsewhere?
Metadata
Metadata
Assignees
Labels
No labels