You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tsdb/engine/tsm1/compact_property_test.go
+7-8Lines changed: 7 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -38,32 +38,31 @@ type fileInfo struct {
38
38
// This rule is important to maintain the ordering of files, with improper ordering we cannot determine which point is the newest point when overwrites occur.
39
39
// We always want the newest write to win.
40
40
funcvalidateFileAdjacency(allFiles []string, groups []tsm1.CompactionGroup) error {
41
-
varfileInfos[]fileInfo
41
+
fileInfos:=make([]*fileInfo, 0, len(allFiles))
42
42
for_, file:=rangeallFiles {
43
43
gen, seq, err:=tsm1.DefaultParseFileName(file)
44
44
iferr!=nil {
45
45
returnfmt.Errorf("failed to parse file %s: %v", file, err)
46
46
}
47
-
fileInfos=append(fileInfos, fileInfo{
47
+
fileInfos=append(fileInfos, &fileInfo{
48
48
filename: file,
49
49
generation: gen,
50
50
sequence: seq,
51
51
})
52
52
}
53
53
54
-
slices.SortFunc(fileInfos, func(a, bfileInfo) int {
54
+
slices.SortFunc(fileInfos, func(a, b*fileInfo) int {
0 commit comments