Skip to content

Commit

Permalink
Merge branch 'main' into DOC-9332
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlinville authored Apr 3, 2024
2 parents 6b1ab16 + 3f07ead commit b1655ff
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ node_modules
/src/*/bootstrap
/src/*/vendor/
spec_30_enriched.json
.bundle/config
27 changes: 27 additions & 0 deletions src/current/_data/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5735,3 +5735,30 @@
docker_arm_limited_access: false
source: true
previous_release: v24.1.0-alpha.3

- release_name: v24.1.0-alpha.5
major_version: v24.1
release_date: '2024-04-01'
release_type: Testing
go_version: go1.22.0
sha: 40cc14f35ef73ab5aed081329e2592301bc2254c
has_sql_only: true
has_sha256sum: true
mac:
mac_arm: true
mac_arm_experimental: true
mac_arm_limited_access: true
windows: true
linux:
linux_arm: true
linux_arm_experimental: false
linux_arm_limited_access: false
linux_intel_fips: true
linux_arm_fips: false
docker:
docker_image: cockroachdb/cockroach-unstable
docker_arm: true
docker_arm_experimental: false
docker_arm_limited_access: false
source: true
previous_release: v24.1.0-alpha.4
116 changes: 116 additions & 0 deletions src/current/_includes/releases/v24.1/v24.1.0-alpha.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
## v24.1.0-alpha.5

Release Date: April 1, 2024

{% include releases/release-downloads-docker-image.md release=include.release %}

<h3 id="v24-1-0-alpha-5-{{-site.data.products.enterprise-}}-edition-changes">{{ site.data.products.enterprise }} edition changes</h3>

- [Changefeeds]({% link v24.1/change-data-capture-overview.md %}) now default to evenly distributing their work across all replicas, including followers, regardless of leaseholder placement. To disable this behavior, set the [cluster setting]({% link v24.1/cluster-settings.md %}) `changefeed.balanced_distribution.enabled` to `false`. If disabled, changefeed planning reverts to its previous behavior for distributing work. [#120077][#120077]
- When [physical cluster replication]({% link v24.1/physical-cluster-replication-overview.md %}) is enabled, the output of the `SHOW VIRTUAL CLUSTER ... WITH REPLICATION STATUS` command now displays replication lag. [#120782][#120782]
- When [physical cluster replication]({% link v24.1/physical-cluster-replication-overview.md %}) is enabled, the output of the `SHOW VIRTUAL CLUSTER WITH REPLICATION STATUS to 1` command has changed:
- The output no longer displays `replication_job_id` or `service_mode` return fields.
- The `data_state` field has been renamed to `status`.
- The fields that are displayed are now ordered as follows: `retained_time`, `replicated_time`, `replication_lag`, `cutover_time`, `status`. [#120782][#120782]

<h3 id="v24-1-0-alpha-5-sql-language-changes">SQL language changes</h3>

- You can now specify a condition for the [PL/pgSQL statements]({% link v24.1/plpgsql.md %}) `EXIT` and `CONTINUE`. [#120686][#120686]
- A [stored procedure]({% link v24.1/stored-procedures.md %}) can now invoke another stored procedure using a [`CALL` statement]({% link v24.1/call.md %}). [#120674][#120674]
- You can now use a [`SET TRANSACTION`]({% link v24.1/set-transaction.md %}) statement within a [PL/pgSQL stored procedure]({% link v24.1/plpgsql.md %}) to configure the transaction isolation level, timestamp, or priority, or to set the transaction to read-only. A `SET TRANSACTION` statement must immediately follow a `COMMIT` or `ROLLBACK`, with no other statements or block boundaries between them. [#120456][#120456]
- The new [session variable]({% link v24.1/session-variables.md %}) `optimizer_use_virtual_computed_column_stats`, when enabled, configures the [cost-based optimizer]({% link v24.1/cost-based-optimizer.md %}) to use [table statistics]({% link v24.1/show-statistics.md %}) on virtual computed columns. [#120668][#120668]
- An [identity column]({% link v24.1/create-table.md %}#identity-columns) can now drop the `IDENTITY` constraint and related sequence using the following SQL statement:

{% include_cached copy-clipboard.html %}
~~~ sql
ALTER TABLE {table_name} ALTER COLUMN {column_name} DROP IDENTITY [IF EXISTS];
~~~

`IF EXISTS` is optional, and skips the command if the column is not an identity column. [#119263][#119263]

- A shared lock that is acquired explicitly using [`SELECT FOR SHARE`]({% link v24.1/select-for-update.md %}) or implicitly by a [read-committed transaction]({% link v24.1/read-committed.md %}), can now be re-acquired with higher strength by either using a [`SELECT FOR UPDATE`]({% link v24.1/select-for-update.md %}) statement or by writing to the key. [#119671][#119671]
- [Stored procedures]({% link v24.1/stored-procedures.md %}) now support `OUT` and `INOUT` parameter classes. [#120851][#120851]
- The [PL/pgSQL]({% link v24.1/plpgsql.md %}) `EXIT` and `CONTINUE` statements can now use labels to specify which loop or block is the target. [#120733][#120733]

<h3 id="v24-1-0-alpha-5-operational-changes">Operational changes</h3>

- You can now enable asynchronous buffering of `file-group` [log sinks]({% link v24.1/configure-logs.md %}) using the `buffering` [configuration options]({% link v24.1/configure-logs.md %}#log-buffering-for-network-sinks) either by default or to an individual `file-group`. The `buffering` configuration option is incompatible with the `buffered-writes` configuration option. To try the `buffering` option, you must set `buffered-writes: false`. Cockroach Labs recommends setting `max-staleness` to `1s` and `flush-trigger-size` to `256KiB`. [#120428][#120428]
- A minimum [Raft scheduler]({% link v24.1/architecture/replication-layer.md %}#raft) concurrency is now enforced per store so that nodes with many stores do not spread workers too thin. This helps to avoid high scheduler latency across replicas on a store when load is imbalanced. [#120162][#120162]
- The new [metrics]({% link v24.1/metrics.md %}) `kv.split.estimated_stats` and `kv.split.total_bytes_estimates` track the number of splits that produce [MVCC]({% link v24.1/architecture/storage-layer.md %}#mvcc) statistic estimates and the total bytes of estimates produced. [#119894][#119894]
- The new [cluster setting]({% link v24.1/cluster-settings.md %}) `storage.sstable.compression_algorithm` configures the compression algorithm used when compressing sstable blocks. [#120784][#120784]
- The new [cluster setting]({% link v24.1/cluster-settings.md %}) `kv.dist_sender.proxy.enabled`, which is enabled by default, causes proxy requests to be routed through a follower replica when the leaseholder is unavailable. [#117340][#117340]
- The new startup flag `--wal-failover` allows you to explicitly set the path for WAL failover of a single-store node. [#120783][#120783]
- Cluster virtualization is now enabled using either of the new startup flags `--virtualized` or `--virtualized-empty` instead of the `--config-profile` flag. [#120813][#120813]
- The following metrics, which track the SQL statistics subsystem's task to flush in-memory statistics to persisted storage, are now more consistent with other metrics used in the subsystem.
- `sql.stats.flushes.successful`: Number of times SQL statistics have been flushed successfully to persistent storage.
- `sql.stats.flushes.failed`: Number of attempted SQL statistics flushes that failed with errors.
- `sql.stats.flush.latency`: The latency of attempted SQL statistics flushes to persistent storage, including both successes and failures. [#120709][#120709]
- The following new [metrics]({% link v24.1/metrics.md %}) track the number and outcome of proxy requests when `kv.dist_sender.proxy.enabled` is set to `true`:
- `distsender.rpc.proxy.sent`
- `distsender.rpc.proxy.err`
- `distsender.rpc.proxy.forward.sent`
- `distsender.rpc.proxy.forward.err`
Cockroach Labs recommends monitoring and alerting on `distsender.rpc.proxy.sent`, because it indicates a possible network partition. [#120239][#120239]
- The `provisioned-rate` field of a node's store specification can no longer be used to add constraints for the disk name or bandwidth. By default, bandwidth is constrained according to the [cluster setting]({% link v24.1/cluster-settings.md %}) `kv.store.admission.provisioned_bandwidth`. To override this setting for a specific node, the storage specification must contain `provisioned-rate=bandwidth={bandwidth-bytes/s}`. [#120895][#120895]
- Removal of the [cluster setting]({% link v24.1/cluster-settings.md %}) `kv.rangefeed.scheduler.enabled`, which was announced in [v24.1.0-alpha.1](https://www.cockroachlabs.com/docs/releases/v24.1.html#v24-1-0-alpha-1), has been reverted, and the cluster setting is reinstated. [#121164][#121164]

<h3 id="v24-1-0-alpha-5-db-console-changes">DB Console changes</h3>

- In generated statement fingerprints in the DB Console [**Statements** page]({% link v24.1/ui-statements-page.md %}), lists with only literals or placeholders or similar subexpressions are shortened to their first item followed by "__more__". [#120507][#120507]

<h3 id="v24-1-0-alpha-5-bug-fixes">Bug fixes</h3>

- Fixed a bug introduced in v23.2 that could cause a [PL/pgSQL]({% link v24.1/plpgsql.md %}) routine to return incorrect results when the routine included:
1. At least one parameter.
1. An `IF` statement with one leak-proof branch and one branch with side effects. [#120451][#120451]
- Fixed a rare bug where a `BACKUP` command issued shortly after an [`ALTER TABLE {table_name} SET (exclude_data_from_backup = true)`]({% link v24.1/take-full-and-incremental-backups.md %}#exclude-a-tables-data-from-backups) could exclude data from an unrelated table from the backup. [#120188][#120188]
- Fixed a behavior where a memory exhaustion error during a schema change was treated as a permanent failure and reverted. Such schema changes are now retried instead of reverted. [#120806][#120806]
- Fixed a bug where the `attname` for a dropped column was not correctly padded with 8 `.` characters to be compatible with PostgreSQL. [#120861][#120861]

<h3 id="v24-1-0-alpha-5-performance-improvements">Performance improvements</h3>

- Splits no longer hold latches for time proportional to the range size while computing MVCC statistics. Instead, MVCC statistics are pre-computed before the critical section of the split. As a side effect, the resulting statistics are no longer 100% accurate because they may correctly distribute writes concurrent with the split. To mitigate against this potential inaccuracy, and to prevent the statistics from drifting after successive splits, the existing stored statistics are re-computed and corrected if needed during the non-critical section of the split. [#119894][#119894]
- The [cost-based optimizer]({% link v24.1/cost-based-optimizer.md %}) now generates more efficient query plans for some queries with `OFFSET` clauses. [#121160][#121160]

<div class="release-note-contributors" markdown="1">

<h3 id="v24-1-0-alpha-5-contributors">Contributors</h3>

This release includes 157 merged PRs by 44 authors.
We would like to thank the following contributors from the CockroachDB community:

- Andrew Delph

</div>


[#117340]: https://github.com/cockroachdb/cockroach/pull/117340
[#119263]: https://github.com/cockroachdb/cockroach/pull/119263
[#119671]: https://github.com/cockroachdb/cockroach/pull/119671
[#119894]: https://github.com/cockroachdb/cockroach/pull/119894
[#120077]: https://github.com/cockroachdb/cockroach/pull/120077
[#120162]: https://github.com/cockroachdb/cockroach/pull/120162
[#120188]: https://github.com/cockroachdb/cockroach/pull/120188
[#120239]: https://github.com/cockroachdb/cockroach/pull/120239
[#120428]: https://github.com/cockroachdb/cockroach/pull/120428
[#120451]: https://github.com/cockroachdb/cockroach/pull/120451
[#120456]: https://github.com/cockroachdb/cockroach/pull/120456
[#120507]: https://github.com/cockroachdb/cockroach/pull/120507
[#120668]: https://github.com/cockroachdb/cockroach/pull/120668
[#120674]: https://github.com/cockroachdb/cockroach/pull/120674
[#120686]: https://github.com/cockroachdb/cockroach/pull/120686
[#120709]: https://github.com/cockroachdb/cockroach/pull/120709
[#120733]: https://github.com/cockroachdb/cockroach/pull/120733
[#120782]: https://github.com/cockroachdb/cockroach/pull/120782
[#120783]: https://github.com/cockroachdb/cockroach/pull/120783
[#120784]: https://github.com/cockroachdb/cockroach/pull/120784
[#120806]: https://github.com/cockroachdb/cockroach/pull/120806
[#120813]: https://github.com/cockroachdb/cockroach/pull/120813
[#120846]: https://github.com/cockroachdb/cockroach/pull/120846
[#120851]: https://github.com/cockroachdb/cockroach/pull/120851
[#120861]: https://github.com/cockroachdb/cockroach/pull/120861
[#120895]: https://github.com/cockroachdb/cockroach/pull/120895
[#121023]: https://github.com/cockroachdb/cockroach/pull/121023
[#121160]: https://github.com/cockroachdb/cockroach/pull/121160
[#121164]: https://github.com/cockroachdb/cockroach/pull/121164
1 change: 1 addition & 0 deletions src/current/_includes/v22.2/misc/session-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
| <a id="disallow-full-table-scans"></a> `disallow_full_table_scans` | If set to `on`, queries on "large" tables with a row count greater than [`large_full_scan_rows`](#large-full-scan-rows) will not use full table or index scans. If no other query plan is possible, queries will return an error message. This setting does not apply to internal queries, which may plan full table or index scans without checking the session variable. | `off` | Yes | Yes |
| <a name="distsql"></a> `distsql` | The query distribution mode for the session. By default, CockroachDB determines which queries are faster to execute if distributed across multiple nodes, and all other queries are run through the gateway node. | `auto` | Yes | Yes |
| <a name="enable-auto-rehoming"></a> `enable_auto_rehoming` | When enabled, the [home regions](alter-table.html#crdb_region) of rows in [`REGIONAL BY ROW`](alter-table.html#set-the-table-locality-to-regional-by-row) tables are automatically set to the region of the [gateway node](ui-sessions-page.html#session-details-gateway-node) from which any [`UPDATE`](update.html) or [`UPSERT`](upsert.html) statements that operate on those rows originate. | `off` | Yes | Yes |
| <a id="enable-experimental-alter-column-type-general"></a> `enable_experimental_alter_column_type_general` | If `on`, it is possible to [alter column data types]({% link {{ page.version.version }}/alter-table.md %}#alter-column-data-types). | `off` | Yes | Yes |
| <a name="enable-implicit-select-for-update"></a> `enable_implicit_select_for_update` | Indicates whether [`UPDATE`](update.html) and [`UPSERT`](upsert.html) statements acquire locks using the `FOR UPDATE` locking mode during their initial row scan, which improves performance for contended workloads.<br/><br/>For more information about how `FOR UPDATE` locking works, see the documentation for [`SELECT FOR UPDATE`](select-for-update.html). | `on` | Yes | Yes |
| <a name="enable-implicit-transaction-for-batch-statements"></a> `enable_implicit_transaction_for_batch_statements` | Indicates whether multiple statements in a single query (a "batch statement") will all run in the same implicit transaction, which matches the PostgreSQL wire protocol. | `on` | Yes | Yes |
| <a name="enable-insert-fast-path"></a> `enable_insert_fast_path` | Indicates whether CockroachDB will use a specialized execution operator for inserting into a table. We recommend leaving this setting `on`. | `on` | Yes | Yes |
Expand Down
1 change: 1 addition & 0 deletions src/current/_includes/v23.1/misc/session-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
| <a id="disallow-full-table-scans"></a> `disallow_full_table_scans` | If set to `on`, queries on "large" tables with a row count greater than [`large_full_scan_rows`](#large-full-scan-rows) will not use full table or index scans. If no other query plan is possible, queries will return an error message. This setting does not apply to internal queries, which may plan full table or index scans without checking the session variable. | `off` | Yes | Yes |
| <a id="distsql"></a> `distsql` | The query distribution mode for the session. By default, CockroachDB determines which queries are faster to execute if distributed across multiple nodes, and all other queries are run through the gateway node. | `auto` | Yes | Yes |
| <a id="enable-auto-rehoming"></a> `enable_auto_rehoming` | When enabled, the [home regions]({% link {{ page.version.version }}/alter-table.md %}#crdb_region) of rows in [`REGIONAL BY ROW`]({% link {{ page.version.version }}/alter-table.md %}#set-the-table-locality-to-regional-by-row) tables are automatically set to the region of the [gateway node]({% link {{ page.version.version }}/ui-sessions-page.md %}#session-details-gateway-node) from which any [`UPDATE`]({% link {{ page.version.version }}/update.md %}) or [`UPSERT`]({% link {{ page.version.version }}/upsert.md %}) statements that operate on those rows originate. | `off` | Yes | Yes |
| <a id="enable-experimental-alter-column-type-general"></a> `enable_experimental_alter_column_type_general` | If `on`, it is possible to [alter column data types]({% link {{ page.version.version }}/alter-table.md %}#alter-column-data-types). | `off` | Yes | Yes |
| <a id="enable-implicit-select-for-update"></a> `enable_implicit_select_for_update` | Indicates whether [`UPDATE`]({% link {{ page.version.version }}/update.md %}) and [`UPSERT`]({% link {{ page.version.version }}/upsert.md %}) statements acquire locks using the `FOR UPDATE` locking mode during their initial row scan, which improves performance for contended workloads.<br/><br/>For more information about how `FOR UPDATE` locking works, see the documentation for [`SELECT FOR UPDATE`]({% link {{ page.version.version }}/select-for-update.md %}). | `on` | Yes | Yes |
| <a id="enable-implicit-transaction-for-batch-statements"></a> `enable_implicit_transaction_for_batch_statements` | Indicates whether multiple statements in a single query (a "batch statement") will all run in the same implicit transaction, which matches the PostgreSQL wire protocol. | `on` | Yes | Yes |
| <a id="enable-insert-fast-path"></a> `enable_insert_fast_path` | Indicates whether CockroachDB will use a specialized execution operator for inserting into a table. We recommend leaving this setting `on`. | `on` | Yes | Yes |
Expand Down
Loading

0 comments on commit b1655ff

Please sign in to comment.