Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
65374: sql: create system tables for SQL stats r=Azhng a=Azhng

This PR creates two new system tables: system.sql_statement_stats
and system.sql_transaction_stats per RFC #63752.

This is the initial step that addresses #64743.

Release note: None

67175: cloud: bump orchestrator version to 21.1.5 r=JuanLeon1 a=JuanLeon1



67194: sqlsmith: make TLP predicates immutable r=mgartner a=mgartner

Previously, `GenerateTLP` could generate predicates that were not
immutable. For example, a predicate could include `random()`. The TLP
method only works correctly if predicates are immutable. A non-immutable
predicate can cause TLP to erroneously report a correctness bug.

Release note: None

Co-authored-by: Azhng <[email protected]>
Co-authored-by: Juan Leon <[email protected]>
Co-authored-by: Marcus Gartner <[email protected]>
  • Loading branch information
4 people committed Jul 6, 2021
4 parents d23d94c + 0a1e719 + 452f729 + 1641021 commit 3fce327
Show file tree
Hide file tree
Showing 61 changed files with 1,267 additions and 650 deletions.
2 changes: 1 addition & 1 deletion cloud/kubernetes/bring-your-own-certs/client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
serviceAccountName: cockroachdb
containers:
- name: cockroachdb-client
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
# Keep a pod open indefinitely so kubectl exec can be used to get a shell to it
# and run cockroach client commands, such as cockroach sql, cockroach node status, etc.
command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ spec:
topologyKey: kubernetes.io/hostname
containers:
- name: cockroachdb
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
# TODO: Change these to appropriate values for the hardware that you're running. You can see
# the resources that can be allocated on each of your Kubernetes nodes by running:
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/client-secure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
mountPath: /cockroach-certs
containers:
- name: cockroachdb-client
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
volumeMounts:
- name: client-certs
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/cluster-init-secure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
mountPath: /cockroach-certs
containers:
- name: cluster-init
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
volumeMounts:
- name: client-certs
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/cluster-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
spec:
containers:
- name: cluster-init
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
command:
- "/cockroach/cockroach"
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/cockroachdb-statefulset-secure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ spec:
topologyKey: kubernetes.io/hostname
containers:
- name: cockroachdb
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
# TODO: Change these to appropriate values for the hardware that you're running. You can see
# the resources that can be allocated on each of your Kubernetes nodes by running:
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/cockroachdb-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ spec:
topologyKey: kubernetes.io/hostname
containers:
- name: cockroachdb
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
# TODO: Change these to appropriate values for the hardware that you're running. You can see
# the resources that can be allocated on each of your Kubernetes nodes by running:
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/multiregion/client-secure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
serviceAccountName: cockroachdb
containers:
- name: cockroachdb-client
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
volumeMounts:
- name: client-certs
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/multiregion/cluster-init-secure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
serviceAccountName: cockroachdb
containers:
- name: cluster-init
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
volumeMounts:
- name: client-certs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ spec:
topologyKey: kubernetes.io/hostname
containers:
- name: cockroachdb
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
ports:
- containerPort: 26257
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ spec:
name: cockroach-env
containers:
- name: cockroachdb
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
# TODO: Change these to appropriate values for the hardware that you're running. You can see
# the resources that can be allocated on each of your Kubernetes nodes by running:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:
hostNetwork: true
containers:
- name: cockroachdb
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
# TODO: If you configured taints to give CockroachDB exclusive access to nodes, feel free
# to remove the requests and limits sections. If you didn't, you'll need to change these to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ spec:
topologyKey: kubernetes.io/hostname
containers:
- name: cockroachdb
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
# TODO: If you configured taints to give CockroachDB exclusive access to nodes, feel free
# to remove the requests and limits sections. If you didn't, you'll need to change these to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ spec:
- name: cockroachdb
# NOTE: Always use the most recent version of CockroachDB for the best
# performance and reliability.
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
# TODO: Change these to appropriate values for the hardware that you're running. You can see
# the resources that can be allocated on each of your Kubernetes nodes by running:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ spec:
- name: cockroachdb
# NOTE: Always use the most recent version of CockroachDB for the best
# performance and reliability.
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
# TODO: Change these to appropriate values for the hardware that you're running. You can see
# the resources that can be allocated on each of your Kubernetes nodes by running:
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/v1.6/client-secure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
mountPath: /cockroach-certs
containers:
- name: cockroachdb-client
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
volumeMounts:
- name: client-certs
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/v1.6/cluster-init-secure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
mountPath: /cockroach-certs
containers:
- name: cluster-init
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
volumeMounts:
- name: client-certs
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/v1.6/cluster-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
spec:
containers:
- name: cluster-init
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
command:
- "/cockroach/cockroach"
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/v1.6/cockroachdb-statefulset-secure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ spec:
topologyKey: kubernetes.io/hostname
containers:
- name: cockroachdb
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
ports:
- containerPort: 26257
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/v1.6/cockroachdb-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ spec:
topologyKey: kubernetes.io/hostname
containers:
- name: cockroachdb
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
ports:
- containerPort: 26257
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/v1.7/client-secure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
mountPath: /cockroach-certs
containers:
- name: cockroachdb-client
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
volumeMounts:
- name: client-certs
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/v1.7/cluster-init-secure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
mountPath: /cockroach-certs
containers:
- name: cluster-init
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
volumeMounts:
- name: client-certs
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/v1.7/cluster-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
spec:
containers:
- name: cluster-init
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
command:
- "/cockroach/cockroach"
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/v1.7/cockroachdb-statefulset-secure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ spec:
topologyKey: kubernetes.io/hostname
containers:
- name: cockroachdb
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
ports:
- containerPort: 26257
Expand Down
2 changes: 1 addition & 1 deletion cloud/kubernetes/v1.7/cockroachdb-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ spec:
topologyKey: kubernetes.io/hostname
containers:
- name: cockroachdb
image: cockroachdb/cockroach:v21.1.4
image: cockroachdb/cockroach:v21.1.5
imagePullPolicy: IfNotPresent
ports:
- containerPort: 26257
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/settings/settings-for-tenants.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ trace.datadog.project string CockroachDB the project under which traces will be
trace.debug.enable boolean false if set, traces for recent requests can be seen at https://<ui>/debug/requests
trace.lightstep.token string if set, traces go to Lightstep using this token
trace.zipkin.collector string if set, traces go to the given Zipkin instance (example: '127.0.0.1:9411'). Only one tracer can be configured at a time.
version version 21.1-114 set the active cluster version in the format '<major>.<minor>'
version version 21.1-116 set the active cluster version in the format '<major>.<minor>'
2 changes: 1 addition & 1 deletion docs/generated/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@
<tr><td><code>trace.debug.enable</code></td><td>boolean</td><td><code>false</code></td><td>if set, traces for recent requests can be seen at https://<ui>/debug/requests</td></tr>
<tr><td><code>trace.lightstep.token</code></td><td>string</td><td><code></code></td><td>if set, traces go to Lightstep using this token</td></tr>
<tr><td><code>trace.zipkin.collector</code></td><td>string</td><td><code></code></td><td>if set, traces go to the given Zipkin instance (example: '127.0.0.1:9411'). Only one tracer can be configured at a time.</td></tr>
<tr><td><code>version</code></td><td>version</td><td><code>21.1-114</code></td><td>set the active cluster version in the format '<major>.<minor>'</td></tr>
<tr><td><code>version</code></td><td>version</td><td><code>21.1-116</code></td><td>set the active cluster version in the format '<major>.<minor>'</td></tr>
</tbody>
</table>
6 changes: 6 additions & 0 deletions pkg/ccl/backupccl/system_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,12 @@ var systemTableBackupConfiguration = map[string]systemBackupConfiguration{
systemschema.JoinTokensTable.GetName(): {
shouldIncludeInClusterBackup: optOutOfClusterBackup,
},
systemschema.StatementStatisticsTable.GetName(): {
shouldIncludeInClusterBackup: optOutOfClusterBackup,
},
systemschema.TransactionStatisticsTable.GetName(): {
shouldIncludeInClusterBackup: optOutOfClusterBackup,
},
}

// GetSystemTablesToIncludeInClusterBackup returns a set of system table names that
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/testdata/doctor/test_examine_cluster
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
debug doctor examine cluster
----
debug doctor examine cluster
Examining 35 descriptors and 36 namespace entries...
Examining 37 descriptors and 38 namespace entries...
ParentID 50, ParentSchemaID 29: relation "foo" (53): expected matching namespace entry, found none
Examining 3 jobs...
ERROR: validation failed
12 changes: 9 additions & 3 deletions pkg/cli/testdata/zip/partial1
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null
[node 1] 1 log file ...
[node 1] [log file ...
[node 1] requesting ranges... received response... done
[node 1] 37 ranges found
[node 1] 39 ranges found
[node 1] writing range 1... converting to JSON... writing binary output: debug/nodes/1/ranges/1.json... done
[node 1] writing range 2... converting to JSON... writing binary output: debug/nodes/1/ranges/2.json... done
[node 1] writing range 3... converting to JSON... writing binary output: debug/nodes/1/ranges/3.json... done
Expand Down Expand Up @@ -104,6 +104,8 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null
[node 1] writing range 35... converting to JSON... writing binary output: debug/nodes/1/ranges/35.json... done
[node 1] writing range 36... converting to JSON... writing binary output: debug/nodes/1/ranges/36.json... done
[node 1] writing range 37... converting to JSON... writing binary output: debug/nodes/1/ranges/37.json... done
[node 1] writing range 38... converting to JSON... writing binary output: debug/nodes/1/ranges/38.json... done
[node 1] writing range 39... converting to JSON... writing binary output: debug/nodes/1/ranges/39.json... done
[node 2] node status... converting to JSON... writing binary output: debug/nodes/2/status.json... done
[node 2] using SQL connection URL: postgresql://...
[node 2] retrieving SQL data for crdb_internal.feature_usage... writing output: debug/nodes/2/crdb_internal.feature_usage.txt...
Expand Down Expand Up @@ -226,7 +228,7 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null
[node 3] 1 log file ...
[node 3] [log file ...
[node 3] requesting ranges... received response... done
[node 3] 37 ranges found
[node 3] 39 ranges found
[node 3] writing range 1... converting to JSON... writing binary output: debug/nodes/3/ranges/1.json... done
[node 3] writing range 2... converting to JSON... writing binary output: debug/nodes/3/ranges/2.json... done
[node 3] writing range 3... converting to JSON... writing binary output: debug/nodes/3/ranges/3.json... done
Expand Down Expand Up @@ -264,6 +266,8 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null
[node 3] writing range 35... converting to JSON... writing binary output: debug/nodes/3/ranges/35.json... done
[node 3] writing range 36... converting to JSON... writing binary output: debug/nodes/3/ranges/36.json... done
[node 3] writing range 37... converting to JSON... writing binary output: debug/nodes/3/ranges/37.json... done
[node 3] writing range 38... converting to JSON... writing binary output: debug/nodes/3/ranges/38.json... done
[node 3] writing range 39... converting to JSON... writing binary output: debug/nodes/3/ranges/39.json... done
[cluster] doctor examining cluster...... writing binary output: debug/reports/doctor.txt... done
[cluster] requesting list of SQL databases... received response... done
[cluster] 3 databases found
Expand All @@ -272,7 +276,7 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null
[cluster] [database: postgres] requesting database details... received response... converting to JSON... writing binary output: debug/schema/[email protected]... done
[cluster] [database: postgres] 0 tables found
[cluster] [database: system] requesting database details... received response... converting to JSON... writing binary output: debug/schema/[email protected]... done
[cluster] [database: system] 30 tables found
[cluster] [database: system] 32 tables found
[cluster] [database: system] [table: public.comments] requesting table details... received response... converting to JSON... writing binary output: debug/schema/system/public_comments.json... done
[cluster] [database: system] [table: public.descriptor] requesting table details... received response... converting to JSON... writing binary output: debug/schema/system/public_descriptor.json... done
[cluster] [database: system] [table: public.eventlog] requesting table details... received response... converting to JSON... writing binary output: debug/schema/system/public_eventlog.json... done
Expand All @@ -297,8 +301,10 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null
[cluster] [database: system] [table: public.statement_bundle_chunks] requesting table details... received response... converting to JSON... writing binary output: debug/schema/system/public_statement_bundle_chunks.json... done
[cluster] [database: system] [table: public.statement_diagnostics] requesting table details... received response... converting to JSON... writing binary output: debug/schema/system/public_statement_diagnostics.json... done
[cluster] [database: system] [table: public.statement_diagnostics_requests] requesting table details... received response... converting to JSON... writing binary output: debug/schema/system/public_statement_diagnostics_requests.json... done
[cluster] [database: system] [table: public.statement_statistics] requesting table details... received response... converting to JSON... writing binary output: debug/schema/system/public_statement_statistics.json... done
[cluster] [database: system] [table: public.table_statistics] requesting table details... received response... converting to JSON... writing binary output: debug/schema/system/public_table_statistics.json... done
[cluster] [database: system] [table: public.tenants] requesting table details... received response... converting to JSON... writing binary output: debug/schema/system/public_tenants.json... done
[cluster] [database: system] [table: public.transaction_statistics] requesting table details... received response... converting to JSON... writing binary output: debug/schema/system/public_transaction_statistics.json... done
[cluster] [database: system] [table: public.ui] requesting table details... received response... converting to JSON... writing binary output: debug/schema/system/public_ui.json... done
[cluster] [database: system] [table: public.users] requesting table details... received response... converting to JSON... writing binary output: debug/schema/system/public_users.json... done
[cluster] [database: system] [table: public.web_sessions] requesting table details... received response... converting to JSON... writing binary output: debug/schema/system/public_web_sessions.json... done
Expand Down
Loading

0 comments on commit 3fce327

Please sign in to comment.