MCPcopy
hub / github.com/dgraph-io/dgraph / updateCommitStatusHelper

Method updateCommitStatusHelper

dgraph/cmd/zero/oracle.go:250–262  ·  view source on GitHub ↗
(index uint64, src *api.TxnContext)

Source from the content-addressed store, hash-verified

248}
249
250func (o *Oracle) updateCommitStatusHelper(index uint64, src *api.TxnContext) bool {
251 o.Lock()
252 defer o.Unlock()
253 if _, ok := o.commits[src.StartTs]; ok {
254 return false
255 }
256 if src.Aborted {
257 o.commits[src.StartTs] = 0
258 } else {
259 o.commits[src.StartTs] = src.CommitTs
260 }
261 return true
262}
263
264func (o *Oracle) updateCommitStatus(index uint64, src *api.TxnContext) {
265 // TODO: We should check if the tablet is in read-only status here.

Callers 1

updateCommitStatusMethod · 0.95

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected