Skip to content

Commit

Permalink
Sync transactions to disk before changing model state.
Browse files Browse the repository at this point in the history
Is this not required to guarantee ACID properties ?

I spent quite some time trying to understand why the .journal file was not growing in size
with each request. It's confusing for a new user.

Data integrity in case of power outage seems more important to a persistence engine,
than performance.
  • Loading branch information
main committed Nov 17, 2018
1 parent 281ce18 commit e902d14
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ private Prevayler createPrevayler() {
PrevaylerFactory<RoyalFoodTester> factory = new PrevaylerFactory<>();
factory.configurePrevalentSystem(createRoot());

factory.configureJournalDiskSync(false);
factory.configureJournalDiskSync(true);
factory.configurePrevalenceDirectory(PersistenceDiskHelper.calcFolderName(this.getFolder()));

factory.configureJournalSerializer(createSerializer(isUseFastJournalSerialization()));
Expand Down

0 comments on commit e902d14

Please sign in to comment.