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
75451: backupccl,spanconfig,kvserver: ExportRequest noops on ephemeral ranges r=adityamaru a=adityamaru This change is the first of two changes that gets us to the goal of backup ignoring certain table row data, and not holding up GC on these ranges. This change does a few things: - It sets up the transport of the exclude_data_from_backup bit set on a table descriptor, to the span configuration applied in KV. - It teaches ExportRequest on a range marked as excluded to return an empty ExportResponse. In this way, a backup processor will receive no row data to backup up for an ephemeral table. - A follow up change will also teach the SQLTranslator to not populate the protected timestamp field on the SpanConfig for such tables. This way, a long running backup will not hold up GC on such high-churn tables. With no protection on such ranges, it is possible that an ExportRequest targetting the range has a StartTime below the range's GCThreshold. To avoid the returned BatchTimestampBeforeGCError from failing the backup we decorate the the error with information about the range being excluded from backup and handle the error in the backup processor. Informs: #73536 Release note (sql change): BACKUP of a table marked with `exclude_data_from_backup` via `ALTER TABLE ... SET (exclude_data_from_backup = true)` will no longer backup that table's row data. The backup will continue to backup the table's descriptor and related metadata, and so on restore we will end up with an empty version of the backed up table. 76459: kvnemesis: update table ID r=RaduBerinde a=RaduBerinde These tests hardcode a table ID of 50. This now overlaps with the tenant_settings table. Updating to 100, which is now the first user-created ID in a new cluster. Release note: None 76480: kvstreamer: remove a memory leak r=yuzefovich a=yuzefovich At the moment, we have a memory leak of `Streamer` objects (although nil-ed out) because of `SetOnChange` handler of the streamer concurrency limit cluster setting and passing in a closure into `Stopper.AddCloser`. This was copied over from the `DistSender` code, but a crucial difference wasn't appreciated - we have a single global `DistSender` that lives throughout the uptime of the server whereas each `Streamer` object lives only during the query execution. We don't need to dynamically react to changes in the streamer concurrency limits, so this commit removes the handler. The closure has been refactored too. Fixes: #76471. Release note: None 76481: colexec: remove log scope from benchmarks r=yuzefovich a=yuzefovich Using the log scope for benchmarks is not necessary and produces somewhat annoying output where the benchmark results are alternating with the log scope messages. Release note: None 76486: opt: fix bug in histogram estimation code for multi-column spans r=rytaft a=rytaft This commit fixes a bug in the histogram estimation code, which could cause the optimizer to think that an index scan produced 0 rows, when in fact it produced a large number. This was due to an inaccurate assumption in the histogram filtering code that if a span had an exclusive boundary, the upper bound of the span was excluded from the histogram. However, this failed to account for the fact that we support constraining a histogram with multi-column spans, and we can select different column offsets to use to constrain the histogram. The assumption above is only valid if the column offset corresponds to the last column in the span key. This logic has now been fixed. Fixes #76485 Release note (performance improvement): Fixed a bug in the histogram estimation code that could cause the optimizer to think a scan of a multi-column index would produce 0 rows, when in fact it would produce many rows. This could cause the optimizer to choose a suboptimal plan. This bug has now been fixed, making it less likely for the optimizer to choose a suboptimal plan when multiple multi-column indexes are available. 76518: sql/builtins: remove the `root` special case r=rafiss,dt a=knz Discovered by `@dt.` This was leftover complexity from an earlier age. Release note (sql change): The buil-in functions `crdb_internal.force_panic`, `crdb_internal.force_log_fatal`, `crdb_internal.set_vmodule`, `crdb_internal.get_vmodule` are now available to all `admin` users, not just `root`. 76519: sql: deflake TestTenantLogic/3node-tenant/distsql_automatic_stats r=rytaft a=rytaft This commit disables the `3node-tenant` config for the `distsql_automatic_stats` automatic stats test since it's flaky. It also adds comments to explain why. Fixes #63466 Release note: None Co-authored-by: Aditya Maru <[email protected]> Co-authored-by: Radu Berinde <[email protected]> Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Rebecca Taft <[email protected]> Co-authored-by: Raphael 'kena' Poss <[email protected]>
- Loading branch information