Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
86813: pkg/keys: implement SafeFormatter for roachpb.Key r=andreimatei a=abarganier Currently, when a key is logged, the entirety of the pretty-printed key is redacted, hindering observability when parsing through redacted logs (something that will become more common with upcoming compliance requirements). For example, prior to this patch, a pretty-printed key would appear in the following way for the unredacted/redacted cases, respectively: - unredacted: ‹/Table/42/1222/"index key"› - redacted: ‹x› This patch addresses this by implementing the SafeFormatter interface for `roachpb.Key` and `roachpb.RKey`, yielding the following result when looking at the same example above: - unredacted: /Table/42/1222/‹"index key"› - redacted: /Table/42/1222/‹x› While the index key itself remains redacted, the ability to see the specific table, index, and in the case of tenant tables, the tenant itself, provides much better observability into which table & index a log line is referring to than before. Note that this implementation is only partial. It currently only supports keys that fall in the `/Table` keyspace for application tenants and system tenants. Keyspaces such as Meta1, Meta2, Local, etc. are not yet supported, but can be added with much more ease in the future now that the example has been set. Finally, we remove the `maxLen` and related truncation logic from `StringWithDirs`, as this is no longer used. Furthermore, the truncation was invalid as it could have truncated a utf-8 sequence in the wrong place, making the result invalid utf-8. This PR is a continuation of the work originally done by `@kzh` in #67065. See the original PR for some initial discussions. Release note (security update): redacted logs will now reveal pretty-printed keys, except for the index key values themselves. For example `/Table/42/1222/‹x›` will be shown instead of `‹x›` (which was shown previously). This improved redaction is available for the `/Table` keyspace for both system and application tenants. Other keyspaces such as `/Meta1`, `/Meta2`, `/Local`, etc. are not yet supported. Release justification: low risk, high benefit observability changes Addresses #86316 87494: authors: add leon.fattakhov to authors r=coolcom200 a=coolcom200 Release note: None Release justification: non-production code change. 87516: gc: end to end integration test r=tbg a=aliher1911 Currently tests are covering various components, but there's no end to end flow test that would verify that GC will issue GC requests that would successfully remove all relevant data. This commit adds a TestCluster based test to verify GC behaviour. Release justification: test only change Release note: None Fixes #84988 87527: sql: add query level execution stats to sampled query log r=THardy98 a=THardy98 Partially addresses: #84729 This change adds: - network bytes sent - maximum memory usage - maximum disk usage - KV bytes read - KV rows read - network messages fields to the `SampledQuery` telemetry log. Release justification: low risk, high benefit changes to existing functionality Release note (sql change): This change adds:: - network bytes sent - maximum memory usage - maximum disk usage - KV bytes read - KV rows read - network messages fields to the `SampledQuery` telemetry log. 87617: workload/schemachange: propagate worker ID to log r=ajwerner a=ajwerner The schemachange workload can run with concurrency. It logs what workers do. It was hard to understand what different workers are doing because we never populated the worker ID. Release note: None Co-authored-by: Alex Barganier <[email protected]> Co-authored-by: Leon Fattakhov <[email protected]> Co-authored-by: Oleg Afanasyev <[email protected]> Co-authored-by: Thomas Hardy <[email protected]> Co-authored-by: Andrew Werner <[email protected]>
- Loading branch information