Availability:
:- use_module(library(semweb/rdf_persistency)).
min_size(KB)
only
journals larger than KB Kbytes are merged with the base
state. Flushing a journal takes the following steps, ensuring a stable
state can be recovered at any moment.
- Save the current database in a new file using the extension
.new
. - On success, delete the journal
- On success, atomically move the
.new
file over the base state.
Note that journals are not merged automatically for two reasons. First of all, some applications may decide never to merge as the journal contains a complete changelog of the database. Second, merging large databases can be slow and the application may wish to schedule such actions at quiet times or scheduled maintenance periods.