Skip to content

Commit

Permalink
backupccl: set kv.bulkio.write_metadata_sst.enabled to default false
Browse files Browse the repository at this point in the history
This patch sets write_metadata_sst cluster setting to false in prep for the
22.2 branch cut, as there's additional worked required before this feature gets
used in production. Unit tests may continue to write the MetadataSST because of
a new MetamorphicTestBool.

Setting this to false will also stop the roachtest in #86289 from consistently
failing due to #86806.

Fixes #86289

Release note: none

Release justification: prevents using an experimental feature by default
  • Loading branch information
msbutler committed Aug 24, 2022
1 parent fe11e4b commit 7ea3af4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/ccl/backupccl/backup_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func backup(
return roachpb.RowCount{}, err
}

if backupinfo.WriteMetadataSST.Get(&settings.SV) {
if backupinfo.WriteMetadataSST.Get(&settings.SV) || backupinfo.TestWriteMetadataSST {
if err := backupinfo.WriteBackupMetadataSST(ctx, defaultStore, encryption, &kmsEnv, backupManifest,
tableStatistics); err != nil {
err = errors.Wrap(err, "writing forward-compat metadata sst")
Expand Down
1 change: 1 addition & 0 deletions pkg/ccl/backupccl/backupinfo/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ go_library(
"//pkg/sql/sem/tree",
"//pkg/sql/stats",
"//pkg/storage",
"//pkg/util",
"//pkg/util/ctxgroup",
"//pkg/util/encoding",
"//pkg/util/hlc",
Expand Down
10 changes: 7 additions & 3 deletions pkg/ccl/backupccl/backupinfo/manifest_handling.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgerror"
"github.com/cockroachdb/cockroach/pkg/sql/sem/tree"
"github.com/cockroachdb/cockroach/pkg/sql/stats"
"github.com/cockroachdb/cockroach/pkg/util"
"github.com/cockroachdb/cockroach/pkg/util/ctxgroup"
"github.com/cockroachdb/cockroach/pkg/util/encoding"
"github.com/cockroachdb/cockroach/pkg/util/hlc"
Expand Down Expand Up @@ -82,15 +83,18 @@ const (

// WriteMetadataSST controls if we write the experimental new format BACKUP
// metadata file.
// kv.bulkio.rite_metadata_sst.enabled set to false by default due to
// https://github.com/cockroachdb/cockroach/issues/85564.
var WriteMetadataSST = settings.RegisterBoolSetting(
settings.TenantWritable,
"kv.bulkio.write_metadata_sst.enabled",
"write experimental new format BACKUP metadata file",
true,
false,
)

// TestWriteMetadataSST causes unit tests that run a backup to write the metadata sst with some
// probability.
var TestWriteMetadataSST = util.ConstantWithMetamorphicTestBool("write-metadata-sst",
WriteMetadataSST.Default())

// IsGZipped detects whether the given bytes represent GZipped data. This check
// is used rather than a standard implementation such as http.DetectContentType
// since some zipped data may be mis-identified by that method. We've seen
Expand Down

0 comments on commit 7ea3af4

Please sign in to comment.