You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2018/01/21 19:51:00 UTC
[jira] [Commented] (JENA-1469) GraphTxnTDB does not handle abort()
properly
[ https://issues.apache.org/jira/browse/JENA-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16333645#comment-16333645 ]
Andy Seaborne commented on JENA-1469:
-------------------------------------
This isn't directly related to graphs: it's an issue with TDB1 as illustrated by:
{noformat}
public static void main(String ... a) {
DatasetGraph dsg = TDBFactory.createDatasetGraph();
// AbstractTestTransactionLifecycle
//Txn.exec(dsg, TxnType.READ_PROMOTE, ()->g.add( t ));
dsg.begin(TxnType.READ_PROMOTE);
dsg.promote();
dsg.commit();
dsg.end();
dsg.begin(TxnType.WRITE);
dsg.commit();
dsg.end();
System.out.println("Done");
System.exit(0);
}
{noformat}
Using {{DatasetGraphTransaction}} and {{GraphTxnTDB}} isn't a good idea - they are internal classes and have their own additional (and internal) contract.
> GraphTxnTDB does not handle abort() properly
> --------------------------------------------
>
> Key: JENA-1469
> URL: https://issues.apache.org/jira/browse/JENA-1469
> Project: Apache Jena
> Issue Type: Bug
> Components: TDB
> Affects Versions: Jena 3.7.0
> Reporter: Claude Warren
> Priority: Major
> Attachments: TDBGraphTxnTest.java
>
>
> If, when in a transaction, an instance of GraphTxnTDB calls abort() and subsquently calls begin() an "Existing active write transaction" TDBTransactionException is thrown.
>
> Example JUnit test is attached.
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)