rvesse commented on issue #2195:
URL: https://github.com/apache/jena/issues/2195#issuecomment-1891786883

   `GraphTxn` is intended to provide auto-commit style semantics for `Graph`'s. 
 However there was a bug in the `GraphTxn` implementation in the 4.10.0 release 
(#2086) where it incorrectly determined the current transaction state and 
wasn't always creating a transaction when necessary (and conversely would try 
to incorrectly create a transaction when unnecessary)
   
   So the behaviour you are seeing with 5.0.0-SNAPSHOT is the correct expected 
behaviour
   
   Creating the iterator starts a read transaction that isn't committed until 
you explicitly `close()` the iterator.  Trying to do a `g.add()` tries to start 
a write transaction but it can't because the read transaction is still in 
progress.
   
   If you plan to use `GraphTxn` seriously then you should explicitly manage 
the transactions to get the transaction boundaries appropriate to your 
application.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to