Skip to content
Snippets Groups Projects
Commit c0c4e487 authored by Manish R Jain's avatar Manish R Jain
Browse files

Remove unnecessary functions.

parent 4f4059e0
No related branches found
No related tags found
No related merge requests found
......@@ -32,8 +32,6 @@ import (
"github.com/dgraph-io/dgraph/x"
"github.com/dgryski/go-farm"
"github.com/google/flatbuffers/go"
linked "container/list"
)
var glog = x.Log("posting")
......@@ -571,37 +569,6 @@ func (l *List) AddMutation(t x.DirectedEdge, op byte) error {
return l.clog.AddLog(t.Timestamp.UnixNano(), l.hash, mbuf)
}
func addOrSet(ll *linked.List, p *types.Posting) {
added := false
for e := ll.Front(); e != nil; e = e.Next() {
pe := e.Value.(*types.Posting)
if pe == nil {
glog.Fatal("Posting shouldn't be nil!")
}
if !added && pe.Uid() > p.Uid() {
ll.InsertBefore(p, e)
added = true
} else if pe.Uid() == p.Uid() {
added = true
e.Value = p
}
}
if !added {
ll.PushBack(p)
}
}
func remove(ll *linked.List, p *types.Posting) {
for e := ll.Front(); e != nil; e = e.Next() {
pe := e.Value.(*types.Posting)
if pe.Uid() == p.Uid() {
ll.Remove(e)
}
}
}
func (l *List) isDirty() bool {
l.RLock()
defer l.RUnlock()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment