only checkpoint every four slots (#2236)

* only checkpoint every four slots

* only checkpoint every 16 slots

* every 8 slots

* every 4 slots; 8 seems probably okay, but be a bit conservative
This commit is contained in:
tersec 2021-01-15 05:23:54 +00:00 committed by GitHub
parent 295e3c9c73
commit 7da16f4908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -626,6 +626,7 @@ proc onSlotEnd(node: BeaconNode, slot, nextSlot: Slot) =
# Checkpoint the database to clear the WAL file and make sure changes in # Checkpoint the database to clear the WAL file and make sure changes in
# the database are synced with the filesystem. # the database are synced with the filesystem.
if slot mod 4 == 0:
node.db.checkpoint() node.db.checkpoint()
info "Slot end", info "Slot end",