MCPcopy
hub / github.com/grafana/tempo / ownsWALBlock

Function ownsWALBlock

tempodb/encoding/unsupported/wal.go:11–24  ·  view source on GitHub ↗
(entry fs.DirEntry)

Source from the content-addressed store, hash-verified

9)
10
11func ownsWALBlock(entry fs.DirEntry) bool {
12 // all new wal blocks are folders
13 if !entry.IsDir() {
14 return false
15 }
16
17 // We own anything that parses and contains "preview" in the version
18 _, _, version, err := parseName(entry.Name())
19 if err != nil {
20 return false
21 }
22
23 return strings.Contains(version, "preview")
24}
25
26func parseName(filename string) (uuid.UUID, string, string, error) {
27 splits := strings.Split(filename, "+")

Callers 1

OwnsWALBlockMethod · 0.70

Calls 2

parseNameFunction · 0.70
NameMethod · 0.65

Tested by

no test coverage detected