MCPcopy Create free account
hub / github.com/brimdata/super / ReadHead

Method ReadHead

db/journal/queue.go:54–60  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

52}
53
54func (q *Queue) ReadHead(ctx context.Context) (ID, error) {
55 //XXX The head file can be wrong due to races but it will always be
56 // close so we should probe for the next slot(s) and update the HEAD
57 // object if we find a hit. See issue #XXX.
58 id, _, err := readID(ctx, q.engine, q.headPath)
59 return id, err
60}
61
62func (q *Queue) writeHead(ctx context.Context, id ID) error {
63 return writeID(ctx, q.engine, q.headPath, id)

Callers 6

BoundariesMethod · 0.95
CommitMethod · 0.95
OpenMethod · 0.95
loadMethod · 0.80
TestJournalConcurrentFunction · 0.80
OpenFunction · 0.80

Calls 1

readIDFunction · 0.85

Tested by 1

TestJournalConcurrentFunction · 0.64