Skip to content

Commit

Permalink
Update badger to latest version
Browse files Browse the repository at this point in the history
This commit brings the following changes from badger

c45d966 Fix assert in background compression and encryption. (#1366)
14386ac GC: Consider size of value while rewriting (#1357)
b2267c2 Restore: Account for value size as well (#1358)
b762832 Tests: Do not leave behind state goroutines (#1349)
056d859 Support disabling conflict detection (#1344)
fd89894 Compaction: Expired keys and delete markers are never purged (#1354)
543f353 Fix build on golang tip (#1355)
a7e239e StreamWriter: Close head writer (#1347)
da80eb9 Iterator: Always add key to txn.reads (#1328)
7e19cac Add immudb to the project list (#1341)
079f5ae DefaultOptions: Set KeepL0InMemory to false (#1345)
  • Loading branch information
Ibrahim Jarif committed Jun 16, 2020
1 parent 197ca02 commit 06a8f98
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/blevesearch/segment v0.0.0-20160915185041-762005e7a34f // indirect
github.com/blevesearch/snowballstem v0.0.0-20180110192139-26b06a2c243d // indirect
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd
github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200528205344-e7b6e76f96e8
github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200615081930-c45d966681d4
github.com/dgraph-io/dgo/v200 v200.0.0-20200401175452-e463f9234453
github.com/dgraph-io/ristretto v0.0.2
github.com/dgrijalva/jwt-go v3.2.0+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgraph-io/badger v1.6.0 h1:DshxFxZWXUcO0xX476VJC07Xsr6ZCBVRHKZ93Oh7Evo=
github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4=
github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200528205344-e7b6e76f96e8 h1:TDpSSjrjipVJHEpcimd7uRYqiIeMc1LsM7p2tgEl+s8=
github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200528205344-e7b6e76f96e8/go.mod h1:3KY8+bsP8wI0OEnQJAKpd4wIJW/Mm32yw2j/9FUVnIM=
github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200615081930-c45d966681d4 h1:399xipP1BGjp6OJYSrmBw0V4TgIL/wc4xR+8n1HUv5M=
github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200615081930-c45d966681d4/go.mod h1:3KY8+bsP8wI0OEnQJAKpd4wIJW/Mm32yw2j/9FUVnIM=
github.com/dgraph-io/dgo/v200 v200.0.0-20200401175452-e463f9234453 h1:DTgOrw91nMIukDm/WEvdobPLl0LgeDd/JE66+24jBks=
github.com/dgraph-io/dgo/v200 v200.0.0-20200401175452-e463f9234453/go.mod h1:Co+FwJrnndSrPORO8Gdn20dR7FPTfmXr0W/su0Ve/Ig=
github.com/dgraph-io/ristretto v0.0.2-0.20200115201040-8f368f2f2ab3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=
Expand Down
6 changes: 6 additions & 0 deletions worker/server_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ func setBadgerOptions(opt badger.Options) badger.Options {
// Do not load bloom filters on DB open.
opt.LoadBloomsOnOpen = false

// Disable conflict detection in badger. Alpha runs in managed mode and
// perform its own conflict detection so we don't need badger's conflict
// detection. Using badger's conflict detection uses memory which can be
// saved by disabling it.
opt.DetectConflicts = false

glog.Infof("Setting Badger Compression Level: %d", Config.BadgerCompressionLevel)
// Default value of badgerCompressionLevel is 3 so compression will always
// be enabled, unless it is explicitly disabled by setting the value to 0.
Expand Down

0 comments on commit 06a8f98

Please sign in to comment.