ui: fix txn aggregations in txns fingerprints page#98307
ui: fix txn aggregations in txns fingerprints page#98307craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
|
Something else I noticed that applies to both stmts (and now txns) - we never properly aggregated the different app names now that we're only grouping by the fingerprint ids. I will make a follow-up issue to track that. |
|
(This should also fix #68375.) |
This commit addresses 2 issues on the txns overview page: 1. We were previously grouping txns by txn fingerprint id, agg time, agg interval, and app name. This is from a time when we wanted all these fields, but recently we only want to aggregate on txn fingerprint id. This commit changes the grouping to only the txn id. 2. Stats aggregation causing undesired data mutations: We were seeing that in the txns fingerprint page, stats columns would seemingly randomly continue to increase while on the page (e.g. exec count, bytes read). During stats aggregation after grouping by the fields mentioned above, we were using the first txn in the grouping as the base object for stats aggregation, meaning we inherited and mutated the stats object of that txn. Since we aggregate on every re-render, This meant that we were using the result of any previous aggregations as the base for our current aggregation in the re-render. This explains the never-ending incrementing stats. This commit addresses this bug by ensuring we don't re-use the stats object between re-renders by creating a new copy of the stats for every aggregation. Fixes: cockroachdb#96186 Fixes: cockroachdb#68375 Release note (bug fix): stats columns in txns fingerprint overview page does not continuously increment
|
TFTR! |
|
Build failed (retrying...): |
|
Build succeeded: |
|
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from a59d6b6 to blathers/backport-release-22.1-98307: 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 22.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
This commit addresses 2 issues on the txns overview page:
We were previously grouping txns by txn fingerprint id, agg time, agg interval, and app name. This is from a time when we wanted all these fields, but recently we only want to aggregate on txn fingerprint id.
This commit changes the grouping to only the txn id.
Stats aggregation causing undesired data mutations: We were seeing that in the txns fingerprint page,
stats columns would seemingly randomly continue to increase while on the page (e.g. exec count, bytes read). During stats aggregation after grouping by
the fields mentioned above, we were using the first txn in the grouping as the base object for stats
aggregation, meaning we inherited and mutated the stats object of that txn. Since we aggregate on every re-render, This meant that we were using the result of any previous aggregations as the base for our current aggregation in the re-render. This explains the never-ending incrementing stats. This commit addresses this bug by ensuring we don't re-use the stats object between re-renders by creating a new copy of the stats for every aggregation.
Fixes: #96186
Fixes: #68375
Release note (bug fix): stats columns in txns fingerprint overview page does not continuously increment
BEFORE
https://www.loom.com/share/d9bbd98ced2742dd899031fbc16df6af
AFTER
https://www.loom.com/share/5407fbbad086404c8d9d63e7f5ef15dd