Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: add identifiers to sampled query #83938

Merged

Conversation

THardy98
Copy link

@THardy98 THardy98 commented Jul 6, 2022

Partially addresses: #71328

This change introduces identifiers into the sampled query log, namely:

  • Database name
  • Session ID
  • Transaction ID
  • Statement ID

Adding transaction ID incurs an additional lock access, the difference in performance is negligible. Results after running kv95 on a 3 node GCE cluster using roachprod:

setup:

./workload init kv --splits 1000 --read-percent 95
./workload run kv --read-percent 95 --concurrency 64 --sequential --duration 30m
master:

_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__total
 1800.0s        0       29725479        16514.2      3.4      2.8      8.9     16.8    104.9  read

_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__total
 1800.0s        0        1564158          869.0      8.5      8.1     15.7     26.2    100.7  write

_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__result
 1800.0s        0       31289637        17383.1      3.7      2.9     10.0     17.8    104.9
enrich_telemetry_add_identifiers

_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__total
 1800.0s        0       29635045        16463.9      3.4      2.8      8.9     16.8    117.4  read

_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__total
 1800.0s        0        1561022          867.2      8.5      7.9     15.7     26.2    113.2  write

_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__result
 1800.0s        0       31196067        17331.1      3.7      2.9     10.0     17.8    117.4

Release note (sql change): Sampled query telemetry log now includes
session/transaction/statement IDs, and database name of the query.

@THardy98 THardy98 requested a review from a team July 6, 2022 20:58
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Partially addresses: cockroachdb#71328

This change introduces identifiers into the sampled query log, namely:
- Database name
- Session ID
- Transaction ID
- Statement ID

Note: Adding transaction ID incurs an additional lock access.

Release note (sql change): Sampled query telemetry log now includes
session/transaction/statement IDs, and database name of the query.
@THardy98 THardy98 force-pushed the enrich_telemetry_add_identifiers branch from ca6ce63 to eaeb52f Compare July 6, 2022 22:47
@THardy98 THardy98 requested a review from a team July 7, 2022 14:34
@THardy98
Copy link
Author

THardy98 commented Jul 7, 2022

bors r+

@craig
Copy link
Contributor

craig bot commented Jul 7, 2022

Build succeeded:

@craig craig bot merged commit e67e47f into cockroachdb:master Jul 7, 2022
@blathers-crl
Copy link

blathers-crl bot commented Jul 7, 2022

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from eaeb52f to blathers/backport-release-21.2-83938: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 21.2.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

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.

3 participants