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

Method commitMutation

posting/list_test.go:88–103  ·  view source on GitHub ↗
(startTs, commitTs uint64)

Source from the content-addressed store, hash-verified

86}
87
88func (l *List) commitMutation(startTs, commitTs uint64) error {
89 l.Lock()
90 plist := l.mutationMap.get(startTs)
91 l.Unlock()
92 l.setMutationAfterCommit(startTs, commitTs, plist, false)
93
94 // We have a valid commit.
95
96 // In general, a posting list shouldn't try to mix up it's job of keeping
97 // things in memory, with writing things to disk. A separate process can
98 // roll up and write them to disk. posting list should only keep things in
99 // memory, to make it available for transactions. So, all we need to do here
100 // is to roll them up periodically, now being done by draft.go.
101 // For the PLs in memory, we roll them up after we do the disk rollup.
102 return nil
103}
104
105func TestGetSinglePosting(t *testing.T) {
106 key := x.DataKey(x.AttrInRootNamespace("GetSinglePosting"), 123)

Callers 15

TestAddMutationFunction · 0.80
TestAddMutation_ValueFunction · 0.80
TestAddMutation_jchiu1Function · 0.80
TestAddMutation_DelSetFunction · 0.80
TestAddMutation_DelReadFunction · 0.80
TestAddMutation_jchiu3Function · 0.80
TestAddMutation_mrjn1Function · 0.80
TestReadSingleValueFunction · 0.80
TestRollupMaxTsIsSetFunction · 0.80
TestMillionFunction · 0.80
TestAddMutation_mrjn2Function · 0.80

Calls 4

LockMethod · 0.45
getMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected