Hi everyone,
so I am trying to validate the current snapshot of 2.7.4, but I am running
into a few issues which surprise me. The first one is that in my log I
first find the following kind of warning:
17:49:37,851 [jazz.jfs.indexer.internal.triple] WARN TDB -
Transaction not active: 2
A little later, I get the following exception:
17:55:13,038 [1839623590@qtp-1078149187-20] ERROR com.ibm.team.jfs -
Originating Exception:
com.hp.hpl.jena.shared.JenaException: leaveCriticalSection: No lock held
(1839623590@qtp-1078149187-20) Thread R/W: 0/0 :: Model R/W: 0/0 (thread:
1839623590@qtp-1078149187-20)
at com.hp.hpl.jena.shared.LockMRSW.leaveCriticalSection(
LockMRSW.java:175)
at
com.hp.hpl.jena.tdb.transaction.TransactionManager$TSM_WriteBackEndTxn.readerFinishes(
TransactionManager.java:210)
at
com.hp.hpl.jena.tdb.transaction.TransactionManager.readerFinishes(
TransactionManager.java:723)
at
com.hp.hpl.jena.tdb.transaction.TransactionManager.noteTxnCommit(
TransactionManager.java:577)
at
com.hp.hpl.jena.tdb.transaction.TransactionManager.notifyCommit(
TransactionManager.java:427)
at com.hp.hpl.jena.tdb.transaction.Transaction.commit(
Transaction.java:122)
at com.hp.hpl.jena.tdb.transaction.DatasetGraphTxn.commit(
DatasetGraphTxn.java:40)
at
com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction._commit(
DatasetGraphTransaction.java:148)
at com.hp.hpl.jena.tdb.migrate.DatasetGraphTrackActive.commit(
DatasetGraphTrackActive.java:60)
at com.hp.hpl.jena.sparql.core.DatasetImpl.commit(
DatasetImpl.java:141)
at
com.ibm.team.jfs.rdf.internal.jena.tdb.JenaTxTdbProvider.storeOperation(
JenaTxTdbProvider.java:180)
....
So, looking at this, I suspect this is because I should not call commit on
a read transaction (the operation here is a read transaction) The
documentation (
http://jena.apache.org/documentation/tdb/tdb_transactions.html) however
seems to suggest this is permitted, i.e. that commit has the same effect
as end?
Anyhow, so I change my code to not use commit in read transactions, but
then I notice that I am not seeing the results of any queries. It is not
quite clear to me if this is because write transactions did not finish
(they do use commit and then end as per documentation) or whether the read
transaction is not working.
Going further, our tests at certain points need to disconnect from the
index which corresponds (more or less) to a StoreConnection.release(this.
location); which suddenly ("suddenly" means compared to 2.7.1) complains
that transactions are still open. So I debugged and I noticed that the
store claims there is still an active read transaction which is impossible
by looking at all other threads in the debugger.
my question right now is if there is some additional explanation of the
messages above and perhaps an explanation of why it possible that
transactions are considered to be open even if they are not. I don't have
a test case right now as it may be tricky to construct, but with some
additional information, I may be able to debug more from inside our
framework.
thanks
Simon