Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Dgraph): Don't store start_ts in postings #6206

Merged
merged 1 commit into from
Aug 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions posting/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,12 @@ func (l *List) addMutationInternal(ctx context.Context, txn *Txn, t *pb.Directed

// getMutation returns a marshaled version of posting list mutation stored internally.
func (l *List) getMutation(startTs uint64) []byte {
l.RLock()
defer l.RUnlock()
l.Lock()
defer l.Unlock()
if pl, ok := l.mutationMap[startTs]; ok {
for _, p := range pl.GetPostings() {
p.StartTs = 0
}
data, err := pl.Marshal()
x.Check(err)
return data
Expand Down Expand Up @@ -596,6 +599,7 @@ func (l *List) pickPostings(readTs uint64) (uint64, []*pb.Posting) {
deleteBelowTs = effectiveTs
continue
}
mpost.StartTs = startTs
posts = append(posts, mpost)
}
}
Expand Down