Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NamanJain8 committed Feb 24, 2021
1 parent 6fc0662 commit e978b65
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions dgraph/cmd/zero/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,12 @@ func (o *Oracle) sendDeltasToSubscribers() {
}

func (o *Oracle) updateCommitStatusHelper(index uint64, src *api.TxnContext) bool {
if _, ok := o.commits.Load(src.StartTs); ok {
return true
}
ts := src.CommitTs
if src.Aborted {
o.commits.Store(src.StartTs, 0)
} else {
o.commits.Store(src.StartTs, src.CommitTs)
ts = 0
}
return true
_, exist := o.commits.LoadOrStore(src.StartTs, ts)
return !exist
}

func (o *Oracle) updateCommitStatus(index uint64, src *api.TxnContext) {
Expand Down

0 comments on commit e978b65

Please sign in to comment.