forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…db#75881 74314: storage: remove obsolete encryption-at-rest code r=sumeerbhola a=jbowens Remove encryption-at-rest code that handles the upgrade process to the 21.2 encryption-at-rest formats and all code that reads the 21.1 and earlier formats. Fix cockroachdb#72520. Release note: None 75122: spanconfigsql{watcher,reconciler}: setup SQLWatcher to watch for pts updates r=adityamaru a=adityamaru This change sets up a rangefeed on the `system.pts_records` table, and adds this to the set of rangefeeds managed by the SQLWatcher. We switch the unit emitted by the SQLWatcher to a union type called `SQLUpdate` which captures either an update to a descriptor or to a protected timestamp target. The zones and descriptor table rangefeeds will continue to emit descriptor updates. The pts rangefeed will emit descriptor updates for records that target schema objects, and pts target updates for records that target cluster or tenants. The SQLWatcher continues to dedup the SQLUpdates that it emits, so as to ensure there is only one SQLUpdate per descriptor ID, and one SQLUpdate per cluster or tenant target. The reconciler registers a handler that is invoked everytime a batch of SQLUpdates are emitted by the SQLWatcher. There is change in semantics in this part of the code, a future PR will teach the reconciler to parse the pts target SQLUpdates, and in turn instruct the SQLTranslator to generate the appropriate `SystemSpanConfigs`. Note, this file moves the sqlwatcher tests into a ccl package so as to be able to run backup statements to test the rangefeed on the pts table. Informs: cockroachdb#73727 Release note: None 75461: sql: New tables added will have columns in the correct order r=Fenil-P a=Fenil-P Release note (sql change): Reordered unimplemented vtables columns in pg_catalog and information_schema 75881: roachtest: fix drain check in `decommission/drains` r=irfansharif a=cameronnunez Fixes cockroachdb#75774. This patch fixes the drain check in the test, which was previously done incorrectly. Release note: None Co-authored-by: Jackson Owens <[email protected]> Co-authored-by: Aditya Maru <[email protected]> Co-authored-by: Fenil Patel <[email protected]> Co-authored-by: Cameron Nunez <[email protected]>
- Loading branch information
Showing
35 changed files
with
16,031 additions
and
12,570 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_test") | ||
|
||
go_test( | ||
name = "spanconfigsqlwatcherccl_test", | ||
srcs = [ | ||
"main_test.go", | ||
"sqlwatcher_test.go", | ||
], | ||
deps = [ | ||
"//pkg/base", | ||
"//pkg/ccl/backupccl", | ||
"//pkg/ccl/kvccl/kvtenantccl", | ||
"//pkg/ccl/storageccl", | ||
"//pkg/ccl/utilccl", | ||
"//pkg/cloud/impl:cloudimpl", | ||
"//pkg/jobs", | ||
"//pkg/keys", | ||
"//pkg/kv/kvclient/rangefeed:with-mocks", | ||
"//pkg/kv/kvserver/protectedts", | ||
"//pkg/roachpb:with-mocks", | ||
"//pkg/security", | ||
"//pkg/security/securitytest", | ||
"//pkg/server", | ||
"//pkg/spanconfig", | ||
"//pkg/spanconfig/spanconfigsqlwatcher", | ||
"//pkg/sql/catalog/descpb", | ||
"//pkg/testutils", | ||
"//pkg/testutils/serverutils", | ||
"//pkg/testutils/sqlutils", | ||
"//pkg/testutils/testcluster", | ||
"//pkg/util/hlc", | ||
"//pkg/util/leaktest", | ||
"//pkg/util/randutil", | ||
"//pkg/util/syncutil", | ||
"@com_github_cockroachdb_errors//:errors", | ||
"@com_github_stretchr_testify//require", | ||
], | ||
) |
34 changes: 34 additions & 0 deletions
34
pkg/ccl/spanconfigccl/spanconfigsqlwatcherccl/main_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2016 The Cockroach Authors. | ||
// | ||
// Licensed as a CockroachDB Enterprise file under the Cockroach Community | ||
// License (the "License"); you may not use this file except in compliance with | ||
// the License. You may obtain a copy of the License at | ||
// | ||
// https://github.com/cockroachdb/cockroach/blob/master/licenses/CCL.txt | ||
|
||
package spanconfigsqlwatcherccl | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
_ "github.com/cockroachdb/cockroach/pkg/ccl/storageccl" | ||
"github.com/cockroachdb/cockroach/pkg/ccl/utilccl" | ||
"github.com/cockroachdb/cockroach/pkg/security" | ||
"github.com/cockroachdb/cockroach/pkg/security/securitytest" | ||
"github.com/cockroachdb/cockroach/pkg/server" | ||
"github.com/cockroachdb/cockroach/pkg/testutils/serverutils" | ||
"github.com/cockroachdb/cockroach/pkg/testutils/testcluster" | ||
"github.com/cockroachdb/cockroach/pkg/util/randutil" | ||
) | ||
|
||
func TestMain(m *testing.M) { | ||
defer utilccl.TestingEnableEnterprise()() | ||
security.SetAssetLoader(securitytest.EmbeddedAssets) | ||
randutil.SeedForTests() | ||
serverutils.InitTestServerFactory(server.TestServerFactory) | ||
serverutils.InitTestClusterFactory(testcluster.TestClusterFactory) | ||
os.Exit(m.Run()) | ||
} | ||
|
||
//go:generate ../../../util/leaktest/add-leaktest.sh *_test.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.