Skip to content

Commit

Permalink
Switch to Badger's Watermark library, which has a memory leak fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
manishrjain committed Nov 15, 2018
1 parent bec18bc commit 0cd9d82
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 213 deletions.
4 changes: 2 additions & 2 deletions conn/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type Node struct {
// applied is used to keep track of the applied RAFT proposals.
// The stages are proposed -> committed (accepted by cluster) ->
// applied (to PL) -> synced (to BadgerDB).
Applied x.WaterMark
Applied y.WaterMark
}

type raftLogger struct {
Expand Down Expand Up @@ -138,7 +138,7 @@ func NewNode(rc *pb.RaftContext, store *raftwal.DiskStorage) *Node {
},
// processConfChange etc are not throttled so some extra delta, so that we don't
// block tick when applyCh is full
Applied: x.WaterMark{Name: fmt.Sprintf("Applied watermark")},
Applied: y.WaterMark{Name: fmt.Sprintf("Applied watermark")},
RaftContext: rc,
Rand: rand.New(&lockedSource{src: rand.NewSource(time.Now().UnixNano())}),
confChanges: make(map[uint64]chan error),
Expand Down
3 changes: 2 additions & 1 deletion dgraph/cmd/zero/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"math/rand"
"time"

"github.com/dgraph-io/badger/y"
"github.com/dgraph-io/dgo/protos/api"
"github.com/dgraph-io/dgraph/protos/pb"
"github.com/dgraph-io/dgraph/x"
Expand All @@ -46,7 +47,7 @@ type Oracle struct {
startTxnTs uint64
subscribers map[int]chan *pb.OracleDelta
updates chan *pb.OracleDelta
doneUntil x.WaterMark
doneUntil y.WaterMark
syncMarks []syncMark
}

Expand Down
210 changes: 0 additions & 210 deletions x/watermark.go

This file was deleted.

0 comments on commit 0cd9d82

Please sign in to comment.