Prevented two threads from persisting at the same time
Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
parent
b275dabf63
commit
65cba1464a
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue