From d97ca0f9d701f6f129948e029068c0cb717174aa Mon Sep 17 00:00:00 2001 From: Ibrahim Jarif Date: Sat, 11 Jul 2020 14:44:36 +0530 Subject: [PATCH] Update badger to v20.0.7-rc1 Also, disable conflict detection in badger to save memory. ``` 0dfb8b4 Changelog for v20.07.0 (https://github.com/dgraph-io/badger/pull/1411) 03ba278 Add missing changelog for v2.0.3 (https://github.com/dgraph-io/badger/pull/1410) 6001230 Revert "Compress/Encrypt Blocks in the background (https://github.com/dgraph-io/badger/pull/1227)" (https://github.com/dgraph-io/badger/pull/1409) 800305e Revert "Buffer pool for decompression (https://github.com/dgraph-io/badger/pull/1308)" (https://github.com/dgraph-io/badger/pull/1408) 63d9309 Revert "fix: Fix race condition in block.incRef (https://github.com/dgraph-io/badger/pull/1337)" (https://github.com/dgraph-io/badger/pull/1407) e0d058c Revert "add assert to check integer overflow for table size (https://github.com/dgraph-io/badger/pull/1402)" (https://github.com/dgraph-io/badger/pull/1406) d981f47 return error if the vlog writes exceeds more that 4GB. (https://github.com/dgraph-io/badger/pull/1400) 7f4e4b5 add assert to check integer overflow for table size (https://github.com/dgraph-io/badger/pull/1402) 8e896a7 Add a contribution guide (https://github.com/dgraph-io/badger/pull/1379) b79aeef Avoid panic on multiple closer.Signal calls (https://github.com/dgraph-io/badger/pull/1401) 717b89c Enable cross-compiled 32bit tests on TravisCI (https://github.com/dgraph-io/badger/pull/1392) 09dfa66 Update ristretto to commit f66de99 (https://github.com/dgraph-io/badger/pull/1391) 509de73 Update head while replaying value log (https://github.com/dgraph-io/badger/pull/1372) e013bfd Rework DB.DropPrefix (https://github.com/dgraph-io/badger/pull/1381) 3042e37 pre allocate cache key for the block cache and the bloom filter cache (https://github.com/dgraph-io/badger/pull/1371) 675efcd Increase default valueThreshold from 32B to 1KB (https://github.com/dgraph-io/badger/pull/1346) 158d927 Remove second initialization of writech in Open (https://github.com/dgraph-io/badger/pull/1382) d37ce36 Tests: Use t.Parallel in TestIteratePrefix tests (https://github.com/dgraph-io/badger/pull/1377) 3f4761d Force KeepL0InMemory to be true when InMemory is true (https://github.com/dgraph-io/badger/pull/1375) dd332b0 Avoid panic in filltables() (https://github.com/dgraph-io/badger/pull/1365) c45d966 Fix assert in background compression and encryption. (https://github.com/dgraph-io/badger/pull/1366) ``` --- go.mod | 4 ++-- go.sum | 8 ++++---- worker/server_state.go | 3 +++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 9ce91c7ce9a..8a46ae55434 100644 --- a/go.mod +++ b/go.mod @@ -16,9 +16,9 @@ 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.20200609141616-14386ac9b764 + github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200711090415-0dfb8b45d4a4 github.com/dgraph-io/dgo/v2 v2.1.1-0.20191127085444-c7a02678e8a6 - github.com/dgraph-io/ristretto v0.0.2-0.20200115201040-8f368f2f2ab3 + github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 github.com/dgryski/go-groupvarint v0.0.0-20190318181831-5ce5df8ca4e1 diff --git a/go.sum b/go.sum index cf7729d725e..0c84838d5ec 100644 --- a/go.sum +++ b/go.sum @@ -62,12 +62,12 @@ github.com/d4l3k/messagediff v1.2.1/go.mod h1:Oozbb1TVXFac9FtSIxHBMnBCq2qeH/2KkE github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/v2 v2.0.1-rc1.0.20200609141616-14386ac9b764 h1:cWmYs+E7F/w4KWIkVrV3VLUJkqolRa7y5G2LLMPQVQs= -github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200609141616-14386ac9b764/go.mod h1:3KY8+bsP8wI0OEnQJAKpd4wIJW/Mm32yw2j/9FUVnIM= +github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200711090415-0dfb8b45d4a4 h1:M85aROJxDOXmp8mZQN6x04EraKDGOF2RL3ox/6LZdjo= +github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200711090415-0dfb8b45d4a4/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/dgo/v2 v2.1.1-0.20191127085444-c7a02678e8a6 h1:5leDFqGys055YO3TbghBhk/QdRPEwyLPdgsSJfiR20I= github.com/dgraph-io/dgo/v2 v2.1.1-0.20191127085444-c7a02678e8a6/go.mod h1:LJCkLxm5fUMcU+yb8gHFjHt7ChgNuz3YnQQ6MQkmscI= -github.com/dgraph-io/ristretto v0.0.2-0.20200115201040-8f368f2f2ab3 h1:MQLRM35Pp0yAyBYksjbj1nZI/w6eyRY/mWoM1sFf4kU= -github.com/dgraph-io/ristretto v0.0.2-0.20200115201040-8f368f2f2ab3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de h1:t0UHb5vdojIDUqktM6+xJAfScFBsVpXZmqC9dsgJmeA= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= diff --git a/worker/server_state.go b/worker/server_state.go index 47899cbfef8..bf2cd30a173 100644 --- a/worker/server_state.go +++ b/worker/server_state.go @@ -173,6 +173,9 @@ func (s *ServerState) initStorage() { glog.Infof("Opening postings BadgerDB with options: %+v\n", opt) opt.EncryptionKey = key + // Disable conflict detection in badger since dgraph performs it's own conflict detection. + opt.DetectConflicts = false + s.Pstore, err = badger.OpenManaged(opt) x.Checkf(err, "Error while creating badger KV posting store")