sql: fix in-memory stmt stats not properly updating#69441
sql: fix in-memory stmt stats not properly updating#69441craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
maryliag
left a comment
There was a problem hiding this comment.
Thanks for doing this quickly, just a few nits from me
Reviewed 3 of 4 files at r1, all commit messages.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @Azhng)
pkg/sql/sqlstats/sslocal/sql_stats_test.go, line 26 at r1 (raw file):
) func TestSQLStatsStmtStatsTempObjectRandomMetadata(t *testing.T) {
that is really long name and a little hard to understand at first, so add some comments about what this test is for
pkg/sql/sqlstats/ssmemstorage/ss_mem_storage.go, line 259 at r1 (raw file):
stmtStats.mu.data.Add(&statistics[i].Stats) // We now manually add all other single metadata fields.
nit: avoid using "now" on comments, could be confusing and don't add much information (now on this part of the code or now is in this code is doing now because it wasn't doing before). Change to something like:
// Setting all metadata fields
18b6b73 to
442910e
Compare
Azhng
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @maryliag)
pkg/sql/sqlstats/sslocal/sql_stats_test.go, line 26 at r1 (raw file):
Previously, maryliag (Marylia Gutierrez) wrote…
that is really long name and a little hard to understand at first, so add some comments about what this test is for
Done.
maryliag
left a comment
There was a problem hiding this comment.
Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @maryliag)
Previsouly, in-memeory statement statistics does not return any metadata. This is due to the temp SQLStats object used for aggregating RPC fanout results not properly updating the metadata fields. This commit address the bug and expanded testing to randomly test all fields for statement statistics metadata. Resolves cockroachdb#69363 Release justification: Category 2: Bug fixes and low-risk updates to new functionality Release note: None
442910e to
d2aae61
Compare
|
bors r=maryliag |
|
Build succeeded: |
Previsouly, in-memeory statement statistics does not return
any metadata. This is due to the temp SQLStats object used
for aggregating RPC fanout results not properly updating the
metadata fields.
This commit address the bug and expanded testing to randomly
test all fields for statement statistics metadata.
Resolves #69363
Release justification: Category 2: Bug fixes and low-risk updates
to new functionality
Release note: None