Prevented two threads from persisting at the same time

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
Jim Martens 2017-05-31 15:12:14 +02:00
parent b275dabf63
commit 65cba1464a
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ public class PersistenceManager {
/** /**
* Checks for full buffer and persists data of committed transactions to storage if buffer is full. * Checks for full buffer and persists data of committed transactions to storage if buffer is full.
*/ */
private void persist() { private synchronized void persist() {
if (_pageBuffer.size() <= 5) { if (_pageBuffer.size() <= 5) {
return; return;
} }