Skip to content

Commit

Permalink
internal/manifest: Fix merge skew with Formatter -> FormatKey change
Browse files Browse the repository at this point in the history
Merging cockroachdb#614 and cockroachdb#635 in quick succession broke the master build.
This change updates L0SubLevels with the type rename.
  • Loading branch information
itsbilal committed Apr 21, 2020
1 parent 6a43207 commit f799993
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/manifest/l0_sublevels.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ type L0SubLevels struct {
// that sublevel in increasing key order.
Files [][]*FileMetadata

cmp Compare
format base.Formatter
cmp Compare
formatKey base.FormatKey

fileBytes uint64
// Contains all files in one slice, ordered from oldest to youngest.
Expand Down Expand Up @@ -207,10 +207,10 @@ func insertIntoSubLevel(files []*FileMetadata, f *FileMetadata) []*FileMetadata
func NewL0SubLevels(
files []*FileMetadata,
cmp Compare,
formatter base.Formatter,
formatKey base.FormatKey,
flushSplitMaxBytes uint64,
) (*L0SubLevels, error) {
s := &L0SubLevels{cmp: cmp, format: formatter}
s := &L0SubLevels{cmp: cmp, formatKey: formatKey}
s.filesByAge = files
keys := make([]intervalKey, 0, 2*len(files))
for i := range s.filesByAge {
Expand Down Expand Up @@ -336,7 +336,7 @@ func (s *L0SubLevels) describe(verbose bool) string {
fmt.Fprintf(&buf, "file count: %d, sublevels: %d, intervals: %d\nflush split keys(%d): [",
len(s.filesByAge), len(s.Files), len(s.orderedIntervals), len(s.flushSplitUserKeys))
for i := range s.flushSplitUserKeys {
fmt.Fprintf(&buf, "%s", s.format(s.flushSplitUserKeys[i]))
fmt.Fprintf(&buf, "%s", s.formatKey(s.flushSplitUserKeys[i]))
if i < len(s.flushSplitUserKeys) - 1 {
fmt.Fprintf(&buf, ", ")
}
Expand Down

0 comments on commit f799993

Please sign in to comment.