Skip to content

Commit

Permalink
always truncate when SyncWrites is enabled
Browse files Browse the repository at this point in the history
This will delete values that were in the process of being "put" when we crashed
but that's likely expected behavior anyways. Without this, ipfs on badger may
refuse to start after a crash.
  • Loading branch information
Stebalien committed Aug 21, 2018
1 parent f3dd075 commit 8ec16fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func NewDatastore(path string, options *Options) (*Datastore, error) {
gcDiscardRatio = options.gcDiscardRatio
}

if osh.IsWindows() && opt.SyncWrites {
if opt.SyncWrites {
opt.Truncate = true
}

Expand Down

0 comments on commit 8ec16fa

Please sign in to comment.