Skip to content

execinfra/sql: return ContentionEvents through ProducerMetadata and add metric#57298

Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom
asubiotto:cont-recv
Dec 2, 2020
Merged

execinfra/sql: return ContentionEvents through ProducerMetadata and add metric#57298
craig[bot] merged 2 commits intocockroachdb:masterfrom
asubiotto:cont-recv

Conversation

@asubiotto
Copy link
Copy Markdown
Contributor

See individual commits for details. This PR adds a sql.distsql.contended_queries.count metric that is incremented if a query produces at least one contention event.

Release note: None

Closes #56798

@asubiotto asubiotto requested review from a team and RaduBerinde December 1, 2020 15:00
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

:lgtm:

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

@asubiotto
Copy link
Copy Markdown
Contributor Author

Getting an issue because the new metric is not present in the chart catalog. Do I want it to be? I'm not sure what this means. I'll look into it tomorrow.

This allows remote components to send back contention events through the
metadata protobuf.

Release note: None
…metric

This commit changes KV layer-aware components to return any ContentionEvents
produced by the KV layer through metadata. Returning ContentionEvents in write
transactions is left for a future commit.

A global contention timeseries metric is also added and incremented at most
once per query by the distsql receiver if at least one contention event is
encountered.

Release note: None (change is not observable by the user)
@asubiotto
Copy link
Copy Markdown
Contributor Author

TFTR

bors r=RaduBerinde

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 2, 2020

Build succeeded:

@craig craig bot merged commit 951ac0a into cockroachdb:master Dec 2, 2020
@asubiotto asubiotto deleted the cont-recv branch December 14, 2020 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sql: add global contended queries per second timeseries metric

3 participants