Skip to content

Commit

Permalink
Update badger to commit cddf7c03451c (#5216)
Browse files Browse the repository at this point in the history
This PR updates badger to latest version
dgraph-io/badger@cddf7c03451c .

This PR also changes the following things.
1. Removes the second argument from `watermark.Init()` function. The
second parameter was removed Init() function by commit
dgraph-io/badger@09dd2e1
2. go.mod and go.sum updates
3. Change `pb.KV` in `pb.proto` to use `badgerpb2.KV` instead of
`badgerpb2.KV`. The protobuf package was renamed from `pb` to
`badgr.pb2` dgraph-io/badger@cddf7c0.

NOTE - I've updated badger using `go get -u ... ` command. All the
changes in go.mod file except badger are a side effect of badger update.

Following new commits are being added from badger
```
git log 91c31ebe8c22...cddf7c03451c --oneline
```
```
cddf7c0 Proto: Rename dgraph.badger.v2.pb to badgerpb2 (#1314)
fd693e4 Support entry version in Write batch (#1310)
f9332eb Disable go 1.11 builds on travis (#1306)
09dd2e1 Replace EventLog with Logger (#1203)
4f6763c Add leveled logging (#1249)
30eeec2 Update issue template (#1295)
8097259 Proto: make badger/v2 compatible with v1 (#1293)
2e708d9 Fail fast if cgo is disabled and compression is ZSTD (#1284)
6e032c0 Fix race condition in DoesNotHave (#1287)
fa94030 Fix Sequence generates duplicate values (#1281)
69f35b3 Add go_package in .proto (#1282)
5f48d42 Disable eventlogging by default (#1285)
4b539b9 Update Project Status in readme.md (#1274)
```

(cherry picked from commit 7b37ddb)
  • Loading branch information
Ibrahim Jarif committed Apr 22, 2020
1 parent 6b57f23 commit a580d02
Show file tree
Hide file tree
Showing 8 changed files with 311 additions and 399 deletions.
2 changes: 1 addition & 1 deletion conn/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func NewNode(rc *pb.RaftContext, store *raftwal.DiskStorage) *Node {
peers: make(map[uint64]string),
requestCh: make(chan linReadReq, 100),
}
n.Applied.Init(nil, true)
n.Applied.Init(nil)
// This should match up to the Applied index set above.
n.Applied.SetDoneUntil(n.Cfg.Applied)
glog.Infof("Setting raft.Config to: %+v\n", n.Cfg)
Expand Down
2 changes: 1 addition & 1 deletion dgraph/cmd/zero/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (o *Oracle) Init() {
o.keyCommit = make(map[string]uint64)
o.subscribers = make(map[int]chan pb.OracleDelta)
o.updates = make(chan *pb.OracleDelta, 100000) // Keeping 1 second worth of updates.
o.doneUntil.Init(nil, true)
o.doneUntil.Init(nil)
go o.sendDeltasToSubscribers()
}

Expand Down
13 changes: 6 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,34 @@ require (
github.com/99designs/gqlgen v0.10.1
github.com/DataDog/datadog-go v0.0.0-20190425163447-40bafcb5f6c1 // indirect
github.com/DataDog/opencensus-go-exporter-datadog v0.0.0-20190503082300-0f32ad59ab08
github.com/DataDog/zstd v1.4.4 // indirect
github.com/DataDog/zstd v1.4.5 // indirect
github.com/OneOfOne/xxhash v1.2.5 // indirect
github.com/beorn7/perks v1.0.0 // indirect
github.com/blevesearch/bleve v0.0.0-20181114232033-e1f5e6cdcd76
github.com/blevesearch/go-porterstemmer v1.0.2 // indirect
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-0.20191220102048-ab4352b00a17
github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200421062606-cddf7c03451c
github.com/dgraph-io/dgo/v2 v2.1.1-0.20191127085444-c7a02678e8a6
github.com/dgraph-io/ristretto v0.0.1 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/dgryski/go-farm v0.0.0-20191112170834-c2139c5d712b
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13
github.com/dgryski/go-groupvarint v0.0.0-20190318181831-5ce5df8ca4e1
github.com/dustin/go-humanize v1.0.0
github.com/go-ini/ini v1.39.0 // indirect
github.com/go-sql-driver/mysql v0.0.0-20190330032241-c0f6b444ad8f
github.com/gogo/protobuf v1.3.1
github.com/golang/geo v0.0.0-20170810003146-31fb0106dc4a
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/protobuf v1.3.2
github.com/golang/protobuf v1.4.0
github.com/golang/snappy v0.0.1
github.com/google/codesearch v1.0.0
github.com/google/go-cmp v0.3.1
github.com/google/go-cmp v0.4.0
github.com/google/uuid v1.0.0
github.com/minio/minio-go v0.0.0-20181109183348-774475480ffe
github.com/paulmach/go.geojson v0.0.0-20170327170536-40612a87147b
github.com/philhofer/fwd v1.0.0 // indirect
github.com/pkg/errors v0.8.1
github.com/pkg/errors v0.9.1
github.com/pkg/profile v1.2.1
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 // indirect
Expand Down
125 changes: 20 additions & 105 deletions go.sum

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion posting/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,6 @@ func (r *rebuilder) Run(ctx context.Context) error {
WithSyncWrites(false).
WithNumVersionsToKeep(math.MaxInt64).
WithCompression(options.None).
WithEventLogging(false).
WithLogRotatesToFlush(10).
WithMaxCacheSize(50) // TODO(Aman): Disable cache altogether

Expand Down
24 changes: 12 additions & 12 deletions protos/pb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -262,19 +262,19 @@ message Snapshot {
}

message Proposal {
Mutations mutations = 2;
repeated KV kv = 4;
MembershipState state = 5;
string clean_predicate = 6; // Delete the predicate which was moved to other group.
string key = 7;
OracleDelta delta = 8;
Snapshot snapshot = 9; // Used to tell the group when to take snapshot.
uint64 index = 10; // Used to store Raft index, in raft.Ready.
uint64 expected_checksum = 11; // Block an operation until membership reaches this checksum.
Mutations mutations = 2;
repeated badgerpb2.KV kv = 4;
MembershipState state = 5;
string clean_predicate = 6; // Delete the predicate which was moved to other group.
string key = 7;
OracleDelta delta = 8;
Snapshot snapshot = 9; // Used to tell the group when to take snapshot.
uint64 index = 10; // Used to store Raft index, in raft.Ready.
uint64 expected_checksum = 11; // Block an operation until membership reaches this checksum.
}

message KVS {
repeated pb.KV kv = 1;
repeated badgerpb2.KV kv = 1;
// done used to indicate if the stream of KVS is over.
bool done = 2;
}
Expand Down Expand Up @@ -509,15 +509,15 @@ service Worker {
rpc Export (ExportRequest) returns (Status) {}
rpc ReceivePredicate(stream KVS) returns (api.Payload) {}
rpc MovePredicate(MovePredicatePayload) returns (api.Payload) {}
rpc Subscribe(SubscriptionRequest) returns (stream pb.KVList) {}
rpc Subscribe(SubscriptionRequest) returns (stream badgerpb2.KVList) {}
}

message SubscriptionRequest {
repeated bytes prefixes = 1;
}

message SubscriptionResponse {
pb.KVList kvs = 1;
badgerpb2.KVList kvs = 1;
}

message Num {
Expand Down
Loading

0 comments on commit a580d02

Please sign in to comment.