Skip to content

Commit

Permalink
Revert "perf: use arraytype for boltdb which is better for delete ope…
Browse files Browse the repository at this point in the history
…ration"

This reverts commit aa9e664.
If using NoFreelistSync the MapType is better, otherwise using ArrayType
  • Loading branch information
absolute8511 committed Aug 28, 2020
1 parent aa9e664 commit 5b51933
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions nsqd/delay_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,9 @@ type DelayQueue struct {

func getDefaultBoltDbOptions(readOnly bool) *bolt.Options {
return &bolt.Options{
Timeout: time.Second,
ReadOnly: readOnly,
// using the array type for boltdb since it is better for delete
FreelistType: bolt.FreelistArrayType,
Timeout: time.Second,
ReadOnly: readOnly,
FreelistType: bolt.FreelistMapType,
NoFreelistSync: true,
}
}
Expand Down

0 comments on commit 5b51933

Please sign in to comment.