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

Function writePostingListToDisk

worker/sort_test.go:48–56  ·  view source on GitHub ↗
(kvs []*bpb.KV)

Source from the content-addressed store, hash-verified

46}
47
48func writePostingListToDisk(kvs []*bpb.KV) error {
49 writer := posting.NewTxnWriter(pstore)
50 for _, kv := range kvs {
51 if err := writer.SetAt(kv.Key, kv.Value, kv.UserMeta[0], kv.Version); err != nil {
52 return err
53 }
54 }
55 return writer.Flush()
56}
57
58func TestEmptyTypeSchema(t *testing.T) {
59 dir, err := os.MkdirTemp("", "storetest_")

Callers 1

rollupFunction · 0.70

Calls 3

SetAtMethod · 0.95
FlushMethod · 0.95
NewTxnWriterFunction · 0.92

Tested by

no test coverage detected