[
https://issues.apache.org/jira/browse/JENA-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16437372#comment-16437372
]
Andy Seaborne edited comment on JENA-485 at 4/13/18 2:38 PM:
-------------------------------------------------------------
This is possible with {{StoreConnection.flush}} which calls
{{TransactionManager.flush}}.
It can be forced by going into exclusive mode to ensure the database is
currently updateable.
was (Author: andy.seaborne):
This is possible with {{StoreConnection.flush}] which calls
{{TransactionManager.flush}}.
It can be forced by going into exclusive mode to ensure the database is
currently updateable.
> TDB should provide a way to flush journalled data back to the DB.
> -----------------------------------------------------------------
>
> Key: JENA-485
> URL: https://issues.apache.org/jira/browse/JENA-485
> Project: Apache Jena
> Issue Type: Bug
> Components: TDB
> Affects Versions: Jena 2.10.1
> Reporter: Andy Seaborne
> Priority: Minor
>
> TDB batches write-commits for performance reasons. Commits are safe when
> they are flushed to the journal. At some point, the journal is written back
> to the main database. This happens periodically in use and always happens on
> startup.
> It would be convenient to allow application code to cleanly force writing the
> journal back to the database for the case when the application has been
> preparing a database for moving elsewhere. It is not critical the journal is
> flushed (its safe anyway) but it is neater for preparing databases for moving
> to a server for publication).
> Workaround 1 : Set the TransactionManager.QueueBatchSize to zero to make each
> write-commit attempt to flush the journal. It may not be able to due to
> outstanding read transactions.
> Workaround 2 : run any TDB command line tool on the database e.g.
> {noformat}
> tdbquery --loc=DIR 'ASK{}'
> {noformat}
> as this will open the database and so flush the journal).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)