Skip to content

sql: add telemetry for mixed DDL/DML transactions#116614

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
rafiss:add-mixed-ddl-dml-telemetry
Dec 18, 2023
Merged

sql: add telemetry for mixed DDL/DML transactions#116614
craig[bot] merged 1 commit intocockroachdb:masterfrom
rafiss:add-mixed-ddl-dml-telemetry

Conversation

@rafiss
Copy link
Copy Markdown
Collaborator

@rafiss rafiss commented Dec 16, 2023

This patch adds feature counter telemetry for explicit transactions that have schema changes. We track if a transaction has DDL only or a mixture of DDL and DML, and if it succeeded or failed.

fixes #115012
Release note: None

This patch adds feature counter telemetry for explicit transactions that
have schema changes. We track is a transaction has DDL only or a mixture
of DDL and DML, and if it succeeded or failed.

Release note: None
@rafiss rafiss added backport-23.1.x PAST MAINTENANCE SUPPORT: 23.1 patch releases via ER request only backport-23.2.x PAST MAINTENANCE SUPPORT: 23.2 patch releases via ER request only labels Dec 16, 2023
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@rafiss rafiss marked this pull request as ready for review December 16, 2023 16:19
@rafiss rafiss requested review from a team and fqazi December 16, 2023 16:19
Copy link
Copy Markdown
Collaborator

@fqazi fqazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! :lgtm:

Reviewed 2 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rafiss)


pkg/sql/conn_executor_exec.go line 1535 at r1 (raw file):

// recordDDLTxnTelemetry records telemetry for explicit transactions that
// contain DDL.
func (ex *connExecutor) recordDDLTxnTelemetry(failed bool) {

Might be worth taking in an err here if we want to analyze failed rollbacks too in the future.

@rafiss
Copy link
Copy Markdown
Collaborator Author

rafiss commented Dec 18, 2023

bors r+

Copy link
Copy Markdown
Collaborator Author

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @fqazi)


pkg/sql/conn_executor_exec.go line 1535 at r1 (raw file):

Previously, fqazi (Faizan Qazi) wrote…

Might be worth taking in an err here if we want to analyze failed rollbacks too in the future.

from talking with Dikshant, these should just be counted under the TransactionFailure metrics

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 18, 2023

Build succeeded:

@craig craig bot merged commit fec5213 into cockroachdb:master Dec 18, 2023
@rafiss rafiss deleted the add-mixed-ddl-dml-telemetry branch December 20, 2023 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-23.1.x PAST MAINTENANCE SUPPORT: 23.1 patch releases via ER request only backport-23.2.x PAST MAINTENANCE SUPPORT: 23.2 patch releases via ER request only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collect telemetry using feature counters when someone executes a transaction with a mix of DDL and DML

3 participants