jlowenz / hypergraphdb

Automatically exported from code.google.com/p/hypergraphdb
0 stars 0 forks source link

TransactionIsReadonlyException when executing getAll() #98

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. executing 
    List<HGValueLink> all = getAll(graphDB, type(String.class));
on a HGDB instance with 65.536 Long-Atoms and 1.000.000 String Atoms from 
outside of a transaction.

What is the expected output? What do you see instead?
Expected: Getting all the String-Labeld Edge Atoms from the database.

Got instead:

$ cat  logs/65536_1000000.geoff-hypergraphdb-readWholeGraph.stdout
checkpoint kbytes:0
checkpoint minutes:0
FREE INCIDENCE CACHE START 5785491392 - 11
MEMUSAGE:Service Thread id: 7

$ cat logs/65536_1000000.geoff-hypergraphdb-readWholeGraph.stderr
Exception in thread "main" java.lang.RuntimeException: 
org.hypergraphdb.transaction.TransactionIsReadonlyException: Transaction 
configured as read-only was used to modify data!
        at org.hypergraphdb.transaction.HGTransactionManager.ensureTransaction(HGTransactionManager.java:320)
        at org.hypergraphdb.HyperGraph.loadAtom(HyperGraph.java:1658)
        at org.hypergraphdb.HyperGraph.get(HyperGraph.java:819)
        at org.hypergraphdb.HGQuery$hg$10.call(HGQuery.java:1761)
        at org.hypergraphdb.HGQuery$hg$10.call(HGQuery.java:1)
        at org.hypergraphdb.transaction.HGTransactionManager.transact(HGTransactionManager.java:396)
        at org.hypergraphdb.transaction.HGTransactionManager.ensureTransaction(HGTransactionManager.java:323)
        at org.hypergraphdb.HGQuery$hg.getAll(HGQuery.java:1752)
        at info.gehrels.diplomarbeit.hypergraphdb.HyperGraphReadWholeGraph.readWholeGraph(HyperGraphReadWholeGraph.java:34)
        at info.gehrels.diplomarbeit.hypergraphdb.HyperGraphDBBenchmarkStep$2.execute(HyperGraphDBBenchmarkStep.java:32)
        at info.gehrels.diplomarbeit.hypergraphdb.HyperGraphDBBenchmarkStep$2.execute(HyperGraphDBBenchmarkStep.java:29)
        at info.gehrels.diplomarbeit.Measurement.measure(Measurement.java:8)
        at info.gehrels.diplomarbeit.Measurement.measure(Measurement.java:14)
        at info.gehrels.diplomarbeit.hypergraphdb.HyperGraphDBBenchmarkStep.readWholeGraph(HyperGraphDBBenchmarkStep.java:29)
        at info.gehrels.diplomarbeit.AbstractBenchmarkStep.execute(AbstractBenchmarkStep.java:41)
        at info.gehrels.diplomarbeit.RunBenchmarkStep.main(RunBenchmarkStep.java:27)
Caused by: org.hypergraphdb.transaction.TransactionIsReadonlyException: 
Transaction configured as read-only was used to modify data!
        at org.hypergraphdb.transaction.HGTransaction.setBoxValue(HGTransaction.java:86)
        at org.hypergraphdb.transaction.VBox.put(VBox.java:102)
        at org.hypergraphdb.transaction.TxCacheMap.put(TxCacheMap.java:216)
        at org.hypergraphdb.cache.WeakRefAtomCache.atomRead(WeakRefAtomCache.java:287)
        at org.hypergraphdb.HyperGraph$8.call(HyperGraph.java:1730)
        at org.hypergraphdb.HyperGraph$8.call(HyperGraph.java:1)
        at org.hypergraphdb.transaction.HGTransactionManager.ensureTransaction(HGTransactionManager.java:316)
        ... 15 more
Local Cache Usage = 4294967296
Cache Layout: Allocation of resources in the cache.
        adminBytes=0
        cacheTotalBytes=4,298,113,024
        dataBytes=0
        lockBytes=4,294,967,296
        sharedCacheTotalBytes=0

java.lang.IllegalStateException: There is 1 existing transaction opened against 
the Environment.
Aborting open transactions ...
aborting <Transaction id="200">
        at com.sleepycat.je.Environment.close(Environment.java:383)
        at org.hypergraphdb.storage.bje.BJEStorageImplementation.shutdown(BJEStorageImplementation.java:178)
        at org.hypergraphdb.HGStore.close(HGStore.java:372)
        at org.hypergraphdb.HyperGraph.close(HyperGraph.java:415)
        at org.hypergraphdb.HGEnvironment.closeAll(HGEnvironment.java:233)
        at org.hypergraphdb.HGEnvironment$OnShutdown.run(HGEnvironment.java:264)
        at java.lang.Thread.run(Thread.java:722)

What version of the product are you using? On what operating system?
1.2

Original issue reported on code.google.com by google-a...@gehrels.info on 19 Mar 2013 at 10:28