forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: add id column to system.users and system.role_id_seq
In preparation for keying roles by ids. See RFC: cockroachdb#77453 Release note: None Co-authored-by: Fenil-P <[email protected]>
- Loading branch information
1 parent
9383292
commit 3ba7d06
Showing
79 changed files
with
1,487 additions
and
337 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
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
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
125 changes: 125 additions & 0 deletions
125
pkg/ccl/spanconfigccl/spanconfigcomparedccl/testdata/basic
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,125 @@ | ||
# Create a database with some tables and set some zone configs; compare how the | ||
# gossip-backed config subsystem compares to the span configs infrastructure. | ||
|
||
reconcile | ||
---- | ||
|
||
exec-sql | ||
CREATE DATABASE db; | ||
CREATE TABLE db.t1(); | ||
CREATE TABLE db.t2(); | ||
---- | ||
|
||
exec-sql | ||
ALTER DATABASE db CONFIGURE ZONE USING num_replicas = 7; | ||
ALTER TABLE db.t1 CONFIGURE ZONE USING num_voters = 5; | ||
---- | ||
|
||
# Both subsystems don't split within the system config span. | ||
# - The gossip-backed system doesn't because it needs to gossips the entire | ||
# range's contents whenever anything in it changes. | ||
# - The span configs infrastructure doesn't, at least for now, for | ||
# inter-operability with the gossip-backed system. | ||
# That said, the span configs infrastructure is used to drive whether | ||
# rangefeeds are enabled on the system database tables. It also controls | ||
# whether strict GC is enforced. For that reason we expect to find different | ||
# span configs from each ("range system" vs. "database system"). | ||
|
||
configs version=legacy offset=4 limit=3 | ||
---- | ||
... | ||
/System/"tse" database system (host) | ||
/Table/SystemConfigSpan/Start database system (host) | ||
/Table/11 database system (host) | ||
... | ||
|
||
configs version=current offset=4 limit=3 | ||
---- | ||
... | ||
/System/"tse" range system | ||
/Table/SystemConfigSpan/Start database system (host) | ||
/Table/11 database system (host) | ||
... | ||
|
||
# Both subsystems observe splits for the tables created above. | ||
|
||
configs version=current offset=41 | ||
---- | ||
... | ||
/Table/46 database system (host) | ||
/Table/47 database system (host) | ||
/Table/48 database system (host) | ||
/Table/50 database system (host) | ||
/Table/106 num_replicas=7 num_voters=5 | ||
/Table/107 num_replicas=7 | ||
|
||
configs version=legacy offset=41 | ||
---- | ||
... | ||
/Table/46 database system (host) | ||
/Table/47 database system (host) | ||
/Table/48 database system (host) | ||
/Table/50 range system | ||
/Table/106 num_replicas=7 num_voters=5 | ||
/Table/107 num_replicas=7 | ||
|
||
# Both subsystems differ slightly with respect to exposed configs ("range | ||
# system" vs. "database system" as described earlier). This only applies to | ||
# tables in the system database, excluding pseudo table IDs. | ||
|
||
diff | ||
---- | ||
--- gossiped system config span (legacy) | ||
+++ span config infrastructure (current) | ||
@@ -1,7 +1,7 @@ | ||
-/Min ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true | ||
-/System/NodeLiveness ttl_seconds=600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true | ||
-/System/NodeLivenessMax database system (host) | ||
-/System/tsd database system (tenant) | ||
-/System/"tse" database system (host) | ||
+/Min ttl_seconds=3600 num_replicas=5 | ||
+/System/NodeLiveness ttl_seconds=600 num_replicas=5 | ||
+/System/NodeLivenessMax range system | ||
+/System/tsd range default | ||
+/System/"tse" range system | ||
/Table/SystemConfigSpan/Start database system (host) | ||
/Table/11 database system (host) | ||
@@ -10,11 +10,11 @@ | ||
/Table/14 database system (host) | ||
/Table/15 database system (host) | ||
-/Table/16 database system (host) | ||
-/Table/17 database system (host) | ||
-/Table/18 database system (host) | ||
+/Table/16 range system | ||
+/Table/17 range system | ||
+/Table/18 range system | ||
/Table/19 database system (host) | ||
/Table/20 database system (host) | ||
/Table/21 database system (host) | ||
-/Table/22 database system (host) | ||
+/Table/22 range system | ||
/Table/23 database system (host) | ||
/Table/24 database system (host) | ||
@@ -23,5 +23,5 @@ | ||
/Table/27 ttl_seconds=600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true | ||
/Table/28 database system (host) | ||
-/Table/29 database system (host) | ||
+/Table/29 range system | ||
/NamespaceTable/30 database system (host) | ||
/NamespaceTable/Max database system (host) | ||
@@ -32,5 +32,5 @@ | ||
/Table/36 database system (host) | ||
/Table/37 database system (host) | ||
-/Table/38 database system (host) | ||
+/Table/38 range system | ||
/Table/39 database system (host) | ||
/Table/40 database system (host) | ||
@@ -43,5 +43,5 @@ | ||
/Table/47 database system (host) | ||
/Table/48 database system (host) | ||
-/Table/50 range system | ||
+/Table/50 database system (host) | ||
/Table/106 num_replicas=7 num_voters=5 | ||
/Table/107 num_replicas=7 | ||
|
||
# vim:ft=diff |
Oops, something went wrong.