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

Method RegisterStartTs

posting/oracle.go:220–231  ·  view source on GitHub ↗
(ts uint64)

Source from the content-addressed store, hash-verified

218}
219
220func (o *oracle) RegisterStartTs(ts uint64) *Txn {
221 o.Lock()
222 defer o.Unlock()
223 txn, ok := o.pendingTxns[ts]
224 if ok {
225 txn.lastUpdate = time.Now()
226 } else {
227 txn = NewTxn(ts)
228 o.pendingTxns[ts] = txn
229 }
230 return txn
231}
232
233func (o *oracle) CacheAt(ts uint64) *LocalCache {
234 o.RLock()

Callers 15

TestCalculateSnapshotFunction · 0.80
TestGetScalarListFunction · 0.80
TestMultipleTxnListCountFunction · 0.80
TestScalarPredicateCountFunction · 0.80
TestSingleUidReplacementFunction · 0.80
TestSingleStringFunction · 0.80
TestLangExactFunction · 0.80
TestReverseEdgeFunction · 0.80

Calls 3

NewTxnFunction · 0.85
LockMethod · 0.45
UnlockMethod · 0.45

Tested by 15

TestCalculateSnapshotFunction · 0.64
TestGetScalarListFunction · 0.64
TestMultipleTxnListCountFunction · 0.64
TestScalarPredicateCountFunction · 0.64
TestSingleUidReplacementFunction · 0.64
TestSingleStringFunction · 0.64
TestLangExactFunction · 0.64
TestReverseEdgeFunction · 0.64