Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
96385: sql: delete descriptor when function is dropped r=chengxiong-ruan a=chengxiong-ruan

Fixes: #95364

**sql: delete descriptor when function is dropped**

Previously, in legacy schema changer, descriptor stayed as
a orphan recrod in system.descriptor when a function is dropped.
While this is not a big issue, we should keep data clean.
This PR adds schema change job logic to handle the deletions.

**upgrades: add upgrade to delete dropped function descriptors**

This commit adds an upgrade to delete orphan descriptors of
functions dropped through legacy schema changer before 23.1.


96403: appstatspb: extract app_stats from roachpb into new package r=yuzefovich a=yuzefovich

This commit extracts `app_stats.proto` and a couple of corresponding files into a new package `sql/appstatspb` from `roachpb`. The rationale for this is that we want to trim down `roachpb` to be specifically about very low-level details of CRDB where the app stats protos don't belong - these are primarily concerned with the SQL layer. Follow-up PRs will move more things out of `roachpb`.

Epic: None

Release note: None

96428: multitenant: fix createInMemoryTenant() roachtest util bug r=knz a=msbutler

Informs #96415

Release note: None

Co-authored-by: Chengxiong Ruan <chengxiongruan@gmail.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
Co-authored-by: Michael Butler <butler@cockroachlabs.com>
  • Loading branch information
4 people committed Feb 2, 2023
4 parents 68078e6 + 0a8e800 + 6eb85d7 + 00cc737 commit fbc9321
Show file tree
Hide file tree
Showing 105 changed files with 1,052 additions and 470 deletions.
1 change: 0 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ exports_files([
# See pkg/roachpb/gen/BUILD.bazel for more details.
#
# gazelle:resolve proto go roachpb/api.proto //pkg/roachpb
# gazelle:resolve proto go roachpb/app_stats.proto //pkg/roachpb
# gazelle:resolve proto go roachpb/data.proto //pkg/roachpb
# gazelle:resolve proto go roachpb/errors.proto //pkg/roachpb
# gazelle:resolve proto go roachpb/index_usage_stats.proto //pkg/roachpb
Expand Down
1 change: 1 addition & 0 deletions docs/generated/http/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ genrule(
"//pkg/server/serverpb:serverpb_proto",
"//pkg/server/status/statuspb:statuspb_proto",
"//pkg/settings:settings_proto",
"//pkg/sql/appstatspb:appstatspb_proto",
"//pkg/sql/catalog/catenumpb:catenumpb_proto",
"//pkg/sql/catalog/catpb:catpb_proto",
"//pkg/sql/catalog/descpb:descpb_proto",
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 @@ -298,4 +298,4 @@ trace.jaeger.agent string the address of a Jaeger agent to receive traces using
trace.opentelemetry.collector string address of an OpenTelemetry trace collector to receive traces using the otel gRPC protocol, as <host>:<port>. If no port is specified, 4317 will be used.
trace.span_registry.enabled boolean true if set, ongoing traces can be seen at https://<ui>/#/debug/tracez
trace.zipkin.collector string the address of a Zipkin instance to receive traces, as <host>:<port>. If no port is specified, 9411 will be used.
version version 1000022.2-34 set the active cluster version in the format '<major>.<minor>'
version version 1000022.2-36 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 @@ -236,6 +236,6 @@
<tr><td><div id="setting-trace-opentelemetry-collector" class="anchored"><code>trace.opentelemetry.collector</code></div></td><td>string</td><td><code></code></td><td>address of an OpenTelemetry trace collector to receive traces using the otel gRPC protocol, as &lt;host&gt;:&lt;port&gt;. If no port is specified, 4317 will be used.</td></tr>
<tr><td><div id="setting-trace-span-registry-enabled" class="anchored"><code>trace.span_registry.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>if set, ongoing traces can be seen at https://&lt;ui&gt;/#/debug/tracez</td></tr>
<tr><td><div id="setting-trace-zipkin-collector" class="anchored"><code>trace.zipkin.collector</code></div></td><td>string</td><td><code></code></td><td>the address of a Zipkin instance to receive traces, as &lt;host&gt;:&lt;port&gt;. If no port is specified, 9411 will be used.</td></tr>
<tr><td><div id="setting-version" class="anchored"><code>version</code></div></td><td>version</td><td><code>1000022.2-34</code></td><td>set the active cluster version in the format &#39;&lt;major&gt;.&lt;minor&gt;&#39;</td></tr>
<tr><td><div id="setting-version" class="anchored"><code>version</code></div></td><td>version</td><td><code>1000022.2-36</code></td><td>set the active cluster version in the format &#39;&lt;major&gt;.&lt;minor&gt;&#39;</td></tr>
</tbody>
</table>
4 changes: 2 additions & 2 deletions docs/generated/sql/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,11 @@
</span></td><td>Immutable</td></tr>
<tr><td><a name="cardinality"></a><code>cardinality(input: anyelement[]) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of elements contained in <code>input</code></p>
</span></td><td>Immutable</td></tr>
<tr><td><a name="crdb_internal.merge_statement_stats"></a><code>crdb_internal.merge_statement_stats(input: jsonb[]) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Merge an array of roachpb.StatementStatistics into a single JSONB object</p>
<tr><td><a name="crdb_internal.merge_statement_stats"></a><code>crdb_internal.merge_statement_stats(input: jsonb[]) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Merge an array of appstatspb.StatementStatistics into a single JSONB object</p>
</span></td><td>Immutable</td></tr>
<tr><td><a name="crdb_internal.merge_stats_metadata"></a><code>crdb_internal.merge_stats_metadata(input: jsonb[]) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Merge an array of StmtStatsMetadata into a single JSONB object</p>
</span></td><td>Immutable</td></tr>
<tr><td><a name="crdb_internal.merge_transaction_stats"></a><code>crdb_internal.merge_transaction_stats(input: jsonb[]) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Merge an array of roachpb.TransactionStatistics into a single JSONB object</p>
<tr><td><a name="crdb_internal.merge_transaction_stats"></a><code>crdb_internal.merge_transaction_stats(input: jsonb[]) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Merge an array of appstatspb.TransactionStatistics into a single JSONB object</p>
</span></td><td>Immutable</td></tr>
<tr><td><a name="string_to_array"></a><code>string_to_array(str: <a href="string.html">string</a>, delimiter: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Split a string into components on a delimiter.</p>
</span></td><td>Immutable</td></tr>
Expand Down
4 changes: 4 additions & 0 deletions pkg/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ ALL_TESTS = [
"//pkg/spanconfig/spanconfigstore:spanconfigstore_test",
"//pkg/spanconfig/spanconfigtestutils:spanconfigtestutils_test",
"//pkg/spanconfig:spanconfig_test",
"//pkg/sql/appstatspb:appstatspb_test",
"//pkg/sql/backfill:backfill_test",
"//pkg/sql/cacheutil:cacheutil_test",
"//pkg/sql/catalog/bootstrap:bootstrap_test",
Expand Down Expand Up @@ -1429,6 +1430,8 @@ GO_TARGETS = [
"//pkg/spanconfig/spanconfigtestutils:spanconfigtestutils_test",
"//pkg/spanconfig:spanconfig",
"//pkg/spanconfig:spanconfig_test",
"//pkg/sql/appstatspb:appstatspb",
"//pkg/sql/appstatspb:appstatspb_test",
"//pkg/sql/backfill:backfill",
"//pkg/sql/backfill:backfill_test",
"//pkg/sql/cacheutil:cacheutil",
Expand Down Expand Up @@ -2744,6 +2747,7 @@ GET_X_DATA_TARGETS = [
"//pkg/spanconfig/spanconfigtestutils:get_x_data",
"//pkg/spanconfig/spanconfigtestutils/spanconfigtestcluster:get_x_data",
"//pkg/sql:get_x_data",
"//pkg/sql/appstatspb:get_x_data",
"//pkg/sql/backfill:get_x_data",
"//pkg/sql/cacheutil:get_x_data",
"//pkg/sql/catalog:get_x_data",
Expand Down
1 change: 1 addition & 0 deletions pkg/ccl/serverccl/statusccl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ go_test(
"//pkg/server",
"//pkg/server/serverpb",
"//pkg/spanconfig",
"//pkg/sql/appstatspb",
"//pkg/sql/catalog/descpb",
"//pkg/sql/clusterunique",
"//pkg/sql/sem/catconstants",
Expand Down
3 changes: 2 additions & 1 deletion pkg/ccl/serverccl/statusccl/tenant_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/security/username"
"github.com/cockroachdb/cockroach/pkg/server/serverpb"
"github.com/cockroachdb/cockroach/pkg/spanconfig"
"github.com/cockroachdb/cockroach/pkg/sql/appstatspb"
"github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb"
"github.com/cockroachdb/cockroach/pkg/sql/clusterunique"
"github.com/cockroachdb/cockroach/pkg/sql/sem/catconstants"
Expand Down Expand Up @@ -1136,7 +1137,7 @@ func testTxnIDResolutionRPC(ctx context.Context, t *testing.T, helper serverccl.
require.Equal(t, txnID, resp.ResolvedTxnIDs[0].TxnID,
"expected to find txn %s on coordinator node %d, but it "+
"was not", txnID.String(), coordinatorNodeID)
require.NotEqual(t, roachpb.InvalidTransactionFingerprintID, resp.ResolvedTxnIDs[0].TxnFingerprintID)
require.NotEqual(t, appstatspb.InvalidTransactionFingerprintID, resp.ResolvedTxnIDs[0].TxnFingerprintID)
return nil
})
}
Expand Down
6 changes: 6 additions & 0 deletions pkg/clusterversion/cockroach_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@ const (
// columnar scans in the KV layer.
V23_1_KVDirectColumnarScans

V23_1_DeleteDroppedFunctionDescriptors

// *************************************************
// Step (1): Add new versions here.
// Do not add new versions to a patch release.
Expand Down Expand Up @@ -705,6 +707,10 @@ var rawVersionsSingleton = keyedVersions{
Key: V23_1_KVDirectColumnarScans,
Version: roachpb.Version{Major: 22, Minor: 2, Internal: 34},
},
{
Key: V23_1_DeleteDroppedFunctionDescriptors,
Version: roachpb.Version{Major: 22, Minor: 2, Internal: 36},
},

// *************************************************
// Step (2): Add new versions here.
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/roachtest/tests/multitenant_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func createInMemoryTenant(
// server in a retry loop.
var tenantSQL *sqlutils.SQLRunner
testutils.SucceedsSoon(t, func() error {
tenantConn, err := c.ConnE(ctx, t.L(), nodes.RandNode()[0])
tenantConn, err := c.ConnE(ctx, t.L(), nodes.RandNode()[0], option.TenantName(tenantName))
if err != nil {
return err
}
Expand Down
1 change: 1 addition & 0 deletions pkg/gen/protobuf.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ PROTOBUF_SRCS = [
"//pkg/server/serverpb:serverpb_go_proto",
"//pkg/server/status/statuspb:statuspb_go_proto",
"//pkg/settings:settings_go_proto",
"//pkg/sql/appstatspb:appstatspb_go_proto",
"//pkg/sql/catalog/catenumpb:catenumpb_go_proto",
"//pkg/sql/catalog/catpb:catpb_go_proto",
"//pkg/sql/catalog/descpb:descpb_go_proto",
Expand Down
4 changes: 4 additions & 0 deletions pkg/jobs/jobspb/jobs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,9 @@ message SchemaChangeDetails {
(gogoproto.customname) = "DroppedDatabaseID",
(gogoproto.casttype) = "github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb.ID"
];
// dropped_functions holds the set of functions to drop as part of DROP
// FUNCTION, DROP DATABASE or DROP SCHEMA statement.
repeated uint32 dropped_functions = 12 [(gogoproto.casttype) = "github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb.ID"];
// desc_id is the target descriptor for this schema change. Note that this ID
// is not always a table ID! We allow referencing any descriptor here to allow
// generic schema changes on descriptors whose schema change process involves
Expand Down Expand Up @@ -839,6 +842,7 @@ message SchemaChangeDetails {
(gogoproto.customtype) = "github.com/cockroachdb/cockroach/pkg/util/uuid.UUID"
];

// Next id 13.
}

message SchemaChangeProgress {
Expand Down
3 changes: 0 additions & 3 deletions pkg/roachpb/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ go_library(
"ambiguous_result_error.go",
"api.go",
"api_requestheader.go",
"app_stats.go",
"batch.go",
"data.go",
"errors.go",
Expand Down Expand Up @@ -73,7 +72,6 @@ go_test(
size = "small",
srcs = [
"api_test.go",
"app_stats_test.go",
"batch_test.go",
"data_test.go",
"errors_test.go",
Expand Down Expand Up @@ -135,7 +133,6 @@ proto_library(
name = "roachpb_proto",
srcs = [
"api.proto",
"app_stats.proto",
"data.proto",
"errors.proto",
"index_usage_stats.proto",
Expand Down
2 changes: 2 additions & 0 deletions pkg/server/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ go_library(
"//pkg/spanconfig/spanconfigsqltranslator",
"//pkg/spanconfig/spanconfigsqlwatcher",
"//pkg/sql",
"//pkg/sql/appstatspb",
"//pkg/sql/catalog",
"//pkg/sql/catalog/bootstrap",
"//pkg/sql/catalog/catalogkeys",
Expand Down Expand Up @@ -464,6 +465,7 @@ go_test(
"//pkg/settings/cluster",
"//pkg/spanconfig",
"//pkg/sql",
"//pkg/sql/appstatspb",
"//pkg/sql/catalog/descpb",
"//pkg/sql/clusterunique",
"//pkg/sql/execinfrapb",
Expand Down
26 changes: 13 additions & 13 deletions pkg/server/combined_statement_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"time"

"github.com/cockroachdb/cockroach/pkg/clusterversion"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/server/serverpb"
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
"github.com/cockroachdb/cockroach/pkg/sql"
"github.com/cockroachdb/cockroach/pkg/sql/appstatspb"
"github.com/cockroachdb/cockroach/pkg/sql/parser"
"github.com/cockroachdb/cockroach/pkg/sql/sem/catconstants"
"github.com/cockroachdb/cockroach/pkg/sql/sem/tree"
Expand Down Expand Up @@ -199,15 +199,15 @@ func collectCombinedStatements(
app := string(tree.MustBeDString(row[2]))
aggregatedTs := tree.MustBeDTimestampTZ(row[3]).Time

var metadata roachpb.CollectedStatementStatistics
var metadata appstatspb.CollectedStatementStatistics
metadataJSON := tree.MustBeDJSON(row[4]).JSON
if err = sqlstatsutil.DecodeStmtStatsMetadataJSON(metadataJSON, &metadata); err != nil {
return nil, serverError(ctx, err)
}

metadata.Key.App = app
metadata.Key.TransactionFingerprintID =
roachpb.TransactionFingerprintID(transactionFingerprintID)
appstatspb.TransactionFingerprintID(transactionFingerprintID)

statsJSON := tree.MustBeDJSON(row[5]).JSON
if err = sqlstatsutil.DecodeStmtStatsStatisticsJSON(statsJSON, &metadata.Stats); err != nil {
Expand All @@ -229,7 +229,7 @@ func collectCombinedStatements(
AggregatedTs: aggregatedTs,
AggregationInterval: time.Duration(aggInterval.Nanos()),
},
ID: roachpb.StmtFingerprintID(statementFingerprintID),
ID: appstatspb.StmtFingerprintID(statementFingerprintID),
Stats: metadata.Stats,
}

Expand Down Expand Up @@ -303,7 +303,7 @@ func collectCombinedTransactions(
return nil, serverError(ctx, err)
}

var metadata roachpb.CollectedTransactionStatistics
var metadata appstatspb.CollectedTransactionStatistics
metadataJSON := tree.MustBeDJSON(row[3]).JSON
if err = sqlstatsutil.DecodeTxnStatsMetadataJSON(metadataJSON, &metadata); err != nil {
return nil, serverError(ctx, err)
Expand All @@ -317,13 +317,13 @@ func collectCombinedTransactions(
aggInterval := tree.MustBeDInterval(row[5]).Duration

txnStats := serverpb.StatementsResponse_ExtendedCollectedTransactionStatistics{
StatsData: roachpb.CollectedTransactionStatistics{
StatsData: appstatspb.CollectedTransactionStatistics{
StatementFingerprintIDs: metadata.StatementFingerprintIDs,
App: app,
Stats: metadata.Stats,
AggregatedTs: aggregatedTs,
AggregationInterval: time.Duration(aggInterval.Nanos()),
TransactionFingerprintID: roachpb.TransactionFingerprintID(fingerprintID),
TransactionFingerprintID: appstatspb.TransactionFingerprintID(fingerprintID),
},
}

Expand Down Expand Up @@ -509,8 +509,8 @@ func getTotalStatementDetails(
return statement, serverError(ctx, errors.Newf("expected %d columns, received %d", expectedNumDatums))
}

var statistics roachpb.CollectedStatementStatistics
var aggregatedMetadata roachpb.AggregatedStatementMetadata
var statistics appstatspb.CollectedStatementStatistics
var aggregatedMetadata appstatspb.AggregatedStatementMetadata
metadataJSON := tree.MustBeDJSON(row[0]).JSON

if err = sqlstatsutil.DecodeAggregatedMetadataJSON(metadataJSON, &aggregatedMetadata); err != nil {
Expand Down Expand Up @@ -613,8 +613,8 @@ func getStatementDetailsPerAggregatedTs(

aggregatedTs := tree.MustBeDTimestampTZ(row[0]).Time

var metadata roachpb.CollectedStatementStatistics
var aggregatedMetadata roachpb.AggregatedStatementMetadata
var metadata appstatspb.CollectedStatementStatistics
var aggregatedMetadata appstatspb.AggregatedStatementMetadata
metadataJSON := tree.MustBeDJSON(row[1]).JSON
if err = sqlstatsutil.DecodeAggregatedMetadataJSON(metadataJSON, &aggregatedMetadata); err != nil {
return nil, serverError(ctx, err)
Expand Down Expand Up @@ -797,8 +797,8 @@ func getStatementDetailsPerPlanHash(
explainPlan = getExplainPlanFromGist(ctx, ie, planGist)
}

var metadata roachpb.CollectedStatementStatistics
var aggregatedMetadata roachpb.AggregatedStatementMetadata
var metadata appstatspb.CollectedStatementStatistics
var aggregatedMetadata appstatspb.AggregatedStatementMetadata
metadataJSON := tree.MustBeDJSON(row[2]).JSON
if err = sqlstatsutil.DecodeAggregatedMetadataJSON(metadataJSON, &aggregatedMetadata); err != nil {
return nil, serverError(ctx, err)
Expand Down
2 changes: 2 additions & 0 deletions pkg/server/diagnostics/diagnosticspb/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ proto_library(
"//pkg/build:build_proto",
"//pkg/config/zonepb:zonepb_proto",
"//pkg/roachpb:roachpb_proto",
"//pkg/sql/appstatspb:appstatspb_proto",
"//pkg/sql/catalog/descpb:descpb_proto",
"@com_github_gogo_protobuf//gogoproto:gogo_proto",
],
Expand All @@ -28,6 +29,7 @@ go_proto_library(
"//pkg/build",
"//pkg/config/zonepb",
"//pkg/roachpb",
"//pkg/sql/appstatspb",
"//pkg/sql/catalog/descpb",
"@com_github_gogo_protobuf//gogoproto",
],
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/diagnostics/diagnosticspb/diagnostics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ option go_package = "diagnosticspb";
import "build/info.proto";
import "config/zonepb/zone.proto";
import "gogoproto/gogo.proto";
import "roachpb/app_stats.proto";
import "sql/appstatspb/app_stats.proto";
import "sql/catalog/descpb/structured.proto";
import "roachpb/metadata.proto";

Expand Down
4 changes: 2 additions & 2 deletions pkg/server/drain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import (
"time"

"github.com/cockroachdb/cockroach/pkg/base"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/server"
"github.com/cockroachdb/cockroach/pkg/server/serverpb"
"github.com/cockroachdb/cockroach/pkg/sql"
"github.com/cockroachdb/cockroach/pkg/sql/appstatspb"
"github.com/cockroachdb/cockroach/pkg/testutils"
"github.com/cockroachdb/cockroach/pkg/testutils/serverutils"
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
Expand Down Expand Up @@ -127,7 +127,7 @@ INSERT INTO t.test VALUES (3);
stats, err := ts.GetScrubbedStmtStats(ctx)
require.NoError(t, err)
require.Truef(t,
func(stats []roachpb.CollectedStatementStatistics) bool {
func(stats []appstatspb.CollectedStatementStatistics) bool {
for _, stat := range stats {
if stat.Key.Query == "INSERT INTO _ VALUES (_)" {
return true
Expand Down
2 changes: 2 additions & 0 deletions pkg/server/serverpb/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ proto_library(
"//pkg/roachpb:roachpb_proto",
"//pkg/server/diagnostics/diagnosticspb:diagnosticspb_proto",
"//pkg/server/status/statuspb:statuspb_proto",
"//pkg/sql/appstatspb:appstatspb_proto",
"//pkg/sql/contentionpb:contentionpb_proto",
"//pkg/sql/sqlstats/insights:insights_proto",
"//pkg/storage/enginepb:enginepb_proto",
Expand Down Expand Up @@ -68,6 +69,7 @@ go_proto_library(
"//pkg/roachpb",
"//pkg/server/diagnostics/diagnosticspb",
"//pkg/server/status/statuspb",
"//pkg/sql/appstatspb",
"//pkg/sql/catalog/descpb", # keep
"//pkg/sql/contentionpb",
"//pkg/sql/execinfrapb", # keep
Expand Down
6 changes: 3 additions & 3 deletions pkg/server/serverpb/status.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import "build/info.proto";
import "errorspb/errors.proto";
import "gossip/gossip.proto";
import "jobs/jobspb/jobs.proto";
import "roachpb/app_stats.proto";
import "roachpb/data.proto";
import "roachpb/index_usage_stats.proto";
import "roachpb/span_config.proto";
import "roachpb/metadata.proto";
import "server/diagnostics/diagnosticspb/diagnostics.proto";
import "server/serverpb/index_recommendations.proto";
import "server/status/statuspb/status.proto";
import "sql/appstatspb/app_stats.proto";
import "sql/contentionpb/contention.proto";
import "sql/sqlstats/insights/insights.proto";
import "storage/enginepb/engine.proto";
Expand Down Expand Up @@ -1001,7 +1001,7 @@ message Session {

// List of transaction fingerprint IDs in this session.
repeated uint64 txn_fingerprint_ids = 17 [(gogoproto.customname) = "TxnFingerprintIDs",
(gogoproto.customtype) = "github.com/cockroachdb/cockroach/pkg/roachpb.TransactionFingerprintID",
(gogoproto.customtype) = "github.com/cockroachdb/cockroach/pkg/sql/appstatspb.TransactionFingerprintID",
(gogoproto.nullable) = false];

// The session's total active time.
Expand Down Expand Up @@ -1608,7 +1608,7 @@ message StatementsResponse {
message CollectedStatementStatistics {
ExtendedStatementStatisticsKey key = 1 [(gogoproto.nullable) = false];
uint64 id = 3 [(gogoproto.customname) = "ID",
(gogoproto.casttype) = "github.com/cockroachdb/cockroach/pkg/roachpb.StmtFingerprintID"];
(gogoproto.casttype) = "github.com/cockroachdb/cockroach/pkg/sql/appstatspb.StmtFingerprintID"];
cockroach.sql.StatementStatistics stats = 2 [(gogoproto.nullable) = false];
}

Expand Down
Loading

0 comments on commit fbc9321

Please sign in to comment.