Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
briankassouf committed Apr 21, 2020
1 parent 064e244 commit 1de70af
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions physical/raft/fsm.go
Expand Up @@ -646,10 +646,9 @@ func (f *FSM) Restore(r io.ReadCloser) error {
b := tx.Bucket(dataBucketName)
s := new(pb.StorageEntry)

// Commit in batches of 50k. Bolt wont split pages until commit and
// holds
// we do incremental writes. This is safe since we have a write lock
// on the fsm's lock.
// Commit in batches of 50k. Bolt holds all the data in memory and
// doesn't split the pages until commit so we do incremental writes.
// This is safe since we have a write lock on the fsm's lock.
for i := 0; i < 50000; i++ {
err := protoReader.ReadMsg(s)
if err != nil {
Expand Down

0 comments on commit 1de70af

Please sign in to comment.