[ https://issues.apache.org/jira/browse/JENA-2086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17318926#comment-17318926 ]
Andy Seaborne edited comment on JENA-2086 at 4/12/21, 8:35 AM: --------------------------------------------------------------- Hi Marco, Yes, all routes go via Journal.sync. It is unnecessary for a read transaction and I'll testing a fix that simply skips the journal in a read-cleanup. Being this deep in the transaction system, means being very careful. I haven't found a reason while it used to work better. ---- Update: As far as I can tellĀ the code here has been the same since TDB2 was introduced into Jena (JENA-1397; Jena 3.5.0). There have been a couple of major changes over the years making it hard to be certain - the code is there, but code call paths may have changed.) TDB1 and TDB2 are completely different in the way they work for transactions. was (Author: andy.seaborne): Hi Marco, Yes, all routes go via Journal.sync. It is unnecessary for a read transaction and I'll testing a fix that simply skips the journal in a read-cleanup. Being this deep in the transaction system, means being very careful. I haven't found a reason while it used to work better. > TDB2: read transactions sync the journal. > ----------------------------------------- > > Key: JENA-2086 > URL: https://issues.apache.org/jira/browse/JENA-2086 > Project: Apache Jena > Issue Type: Improvement > Components: TDB2 > Affects Versions: Jena 3.17.0, Jena 4.0.0 > Reporter: Andy Seaborne > Assignee: Andy Seaborne > Priority: Major > Attachments: jena-sync-overhead.png > > > [Report from users@ > (2021-04-08)|https://lists.apache.org/thread.html/rbc1ff0ae78359b580786ff76ad006f1edeca4da13b0f946cd4f48a8d%40%3Cusers.jena.apache.org%3E] > See attached for stacktrace mentioned in the report. > A simple UC: > {noformat} > DatasetGraph dsg = DatabaseMgr.createDatasetGraph(); > dsg.executeRead(()->{}); > {noformat} > and breakpoint on Journal.sync: > {noformat} > Journal.sync() line: 384 > Journal.reset() line: 397 > TransactionCoordinator.completed(Transaction) line: 708 > Transaction.endInternal() line: 218 > Transaction.commit() line: 182 > TransactionalBase.commitExec() line: 143 > TransactionalBase(TransactionalSystem).commit() line: 33 > TransactionalBase.commit() line: 131 > DatasetGraphTDB(DatasetGraphStorage).commit() line: 69 > DatasetGraphSwitchable(DatasetGraphWrapper).commit() line: 276 > Txn.exec(T, TxnType, Runnable) line: 85 > Txn.executeRead(T, Runnable) line: 115 > DatasetGraphSwitchable(Transactional).executeRead(Runnable) line: 249 > Report.main(String[]) line: 70 > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)