Skip to content

Commit

Permalink
logconfig: link issue cockroachdb#72452 in the error message
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
knz committed Nov 4, 2021
1 parent 6af3cee commit 27dd89a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/util/log/logconfig/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ go_library(
importpath = "github.com/cockroachdb/cockroach/pkg/util/log/logconfig",
visibility = ["//visibility:public"],
deps = [
"//pkg/build",
"//pkg/util/log/logpb",
"@com_github_cockroachdb_errors//:errors",
"@com_github_dustin_go_humanize//:go-humanize",
Expand Down
10 changes: 9 additions & 1 deletion pkg/util/log/logconfig/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"strings"
"time"

"github.com/cockroachdb/cockroach/pkg/build"
"github.com/cockroachdb/cockroach/pkg/util/log/logpb"
"github.com/cockroachdb/errors"
)
Expand Down Expand Up @@ -324,7 +325,14 @@ func (c *Config) newFileSinkConfig(groupName string) *FileSinkConfig {
func (c *Config) validateFileSinkConfig(fc *FileSinkConfig, defaultLogDir *string) error {
propagateFileDefaults(&fc.FileDefaults, c.FileDefaults)
if !fc.Buffering.IsNone() {
return errors.New(`"buffering" not yet supported for file-groups. Use "buffered-writes".`)
// We cannot use unimplemented.WithIssue() here because of a
// circular dependency.
err := errors.UnimplementedError(
errors.IssueLink{IssueURL: build.MakeIssueURL(72452)},
`unimplemented: "buffering" not yet supported for file-groups`)
err = errors.WithHint(err, `Use "buffered-writes".`)
err = errors.WithTelemetry(err, "#72452")
return err
}
if fc.Dir != c.FileDefaults.Dir {
// A directory was specified explicitly. Normalize it.
Expand Down

0 comments on commit 27dd89a

Please sign in to comment.