Skip to content

Commit 397fcfb

Browse files
committed
Merge remote-tracking branch 'origin/molt-replicator' into molt-replicator
2 parents 6c02b9b + 5fae7fc commit 397fcfb

20 files changed

+225
-53
lines changed

src/current/_data/releases.yml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9645,13 +9645,6 @@
96459645
docker_arm_limited_access: false
96469646
source: true
96479647
previous_release: v24.1.24
9648-
cloud_only: true
9649-
cloud_only_message_short: 'Available only for select CockroachDB Cloud clusters'
9650-
cloud_only_message: >
9651-
This version is currently available only for select
9652-
CockroachDB Cloud clusters. To request to upgrade
9653-
a CockroachDB self-hosted cluster to this version,
9654-
[contact support](https://support.cockroachlabs.com/hc/requests/new).
96559648

96569649

96579650
- release_name: v24.3.21
@@ -9680,13 +9673,6 @@
96809673
docker_arm_limited_access: false
96819674
source: true
96829675
previous_release: v24.3.20
9683-
cloud_only: true
9684-
cloud_only_message_short: 'Available only for select CockroachDB Cloud clusters'
9685-
cloud_only_message: >
9686-
This version is currently available only for select
9687-
CockroachDB Cloud clusters. To request to upgrade
9688-
a CockroachDB self-hosted cluster to this version,
9689-
[contact support](https://support.cockroachlabs.com/hc/requests/new).
96909676

96919677

96929678
- release_name: v25.2.7
@@ -9723,7 +9709,7 @@
97239709
a CockroachDB self-hosted cluster to this version,
97249710
[contact support](https://support.cockroachlabs.com/hc/requests/new).
97259711
9726-
9712+
97279713
- release_name: v25.3.3
97289714
major_version: v25.3
97299715
release_date: '2025-10-17'
@@ -9756,4 +9742,32 @@
97569742
This version is currently available only for select
97579743
CockroachDB Cloud clusters. To request to upgrade
97589744
a CockroachDB self-hosted cluster to this version,
9759-
[contact support](https://support.cockroachlabs.com/hc/requests/new).
9745+
[contact support](https://support.cockroachlabs.com/hc/requests/new).
9746+
9747+
9748+
- release_name: v25.4.0-rc.1
9749+
major_version: v25.4
9750+
release_date: '2025-10-22'
9751+
release_type: Testing
9752+
go_version: go1.23.12
9753+
sha: 1de9c4bc217dca385a4f912dbdf828bc5629711a
9754+
has_sql_only: true
9755+
has_sha256sum: true
9756+
mac:
9757+
mac_arm: true
9758+
mac_arm_experimental: true
9759+
mac_arm_limited_access: false
9760+
windows: true
9761+
linux:
9762+
linux_arm: true
9763+
linux_arm_experimental: false
9764+
linux_arm_limited_access: false
9765+
linux_intel_fips: true
9766+
linux_arm_fips: false
9767+
docker:
9768+
docker_image: cockroachdb/cockroach-unstable
9769+
docker_arm: true
9770+
docker_arm_experimental: false
9771+
docker_arm_limited_access: false
9772+
source: true
9773+
previous_release: v25.4.0-beta.3

src/current/_includes/common/upgrade/finalize-self-hosted.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ To finalize a major-version upgrade:
1313

1414
{% include_cached copy-clipboard.html %}
1515
~~~ sql
16-
SET CLUSTER SETTING version '{VERSION}';
16+
SET CLUSTER SETTING version = '{VERSION}';
1717
~~~
1818

1919
A series of migration jobs runs to enable certain types of features and changes in the new major version that cannot be rolled back. These include changes to system schemas, indexes, and descriptors, and enabling certain types of improvements and new features. Until the upgrade is finalized, these features and functions will not be available and the command `SHOW CLUSTER SETTING version` will return the previous version.

src/current/_includes/molt/migration-schema-design-practices.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ Convert the source schema into a CockroachDB-compatible schema. CockroachDB supp
3232

3333
- Every table **must** have an explicit primary key. For more information, refer to [Primary key best practices]({% link {{ site.current_cloud_version }}/schema-design-table.md %}#primary-key-best-practices).
3434

35+
{{site.data.alerts.callout_danger}}
36+
Avoid using sequential keys. To learn more about the performance issues that can result from their use, refer to the [guidance on indexing with sequential keys]({% link {{site.current_cloud_version}}/sql-faqs.md %}#how-do-i-generate-unique-slowly-increasing-sequential-numbers-in-cockroachdb). If a sequential key is necessary in your CockroachDB table, you must create it manually, after using [MOLT Fetch]({% link molt/molt-fetch.md %}) to load and replicate the data.
37+
{{site.data.alerts.end}}
38+
3539
- Review [Transformations]({% link molt/molt-fetch.md %}#transformations) to understand how computed columns and partitioned tables can be mapped to the target, and how target tables can be renamed.
3640

3741
- By default on CockroachDB, `INT` is an alias for `INT8`, which creates 64-bit signed integers. PostgreSQL and MySQL default to 32-bit integers. Depending on your source database or application requirements, you may need to change the integer size to `4`. For more information, refer to [Considerations for 64-bit signed integers]({% link {{ site.current_cloud_version }}/int.md %}#considerations-for-64-bit-signed-integers).
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## v25.4.0-rc.1
2+
3+
Release Date: October 22, 2025
4+
5+
{% include releases/new-release-downloads-docker-image.md release=include.release %}
6+
7+
<h3 id="v25-4-0-rc-1-sql-language-changes">SQL language changes</h3>
8+
9+
- Changed scan misestimate logging gated behind
10+
`sql.log.scan_row_count_misestimate.enabled` to use structured logging
11+
including the table and index being scanned, the estimated and actual
12+
row counts, the time since the last table stats collection, and the
13+
table's estimated staleness. [#155123][#155123]
14+
- Added a default-off cluster setting
15+
(`sql.log.scan_row_count_misestimate.enabled`) that enables logging a
16+
warning on the gateway node when optimizer estimates for scans are
17+
inaccurate. The log message includes the table and index being scanned,
18+
the estimated and actual row counts, the time since the last table stats
19+
collection, and the table's estimated staleness. [#155123][#155123]
20+
- Added the `INSPECT` command, which runs consistency validation check jobs against tables or databases and specified indexes. [#155441][#155441]
21+
- Added the
22+
`bulkio.index_backfill.vector_merge_batch_size cluster` setting to control
23+
how many vectors to merge into a vector index per transaction during
24+
create operations. By default, this defaults to 3. [#155509][#155509]
25+
- Vector indexing is now enabled by default. [#155561][#155561]
26+
27+
<h3 id="v25-4-0-rc-1-bug-fixes">Bug fixes</h3>
28+
29+
- Fixed a bug that caused internal errors for `INSERT .. ON CONFLICT .. DO UPDATE` statements when the target table had both a computed column and a `BEFORE` trigger. This bug was present since triggers were introduced in v24.3.0. [#155077][#155077]
30+
- Disable a feature
31+
(`kv.lock_table.unreplicated_lock_reliability.split.enabled`) that could
32+
lead to a node crash. [#155366][#155366]
33+
- Previously, we could corrupt the first bucket of
34+
table statistic histograms in certain cases, causing underestimates for
35+
range counts near the lower end of the domain, which is now fixed. [#155415][#155415]
36+
- A potential deadlock during vector index
37+
creation has been corrected. [#155508][#155508]
38+
- Added proper dependency handling when adding a constraint with `NOT VALID` that references a user-defined function (UDF). [#155528][#155528]
39+
40+
41+
[#155123]: https://github.com/cockroachdb/cockroach/pull/155123
42+
[#155441]: https://github.com/cockroachdb/cockroach/pull/155441
43+
[#155508]: https://github.com/cockroachdb/cockroach/pull/155508
44+
[#155509]: https://github.com/cockroachdb/cockroach/pull/155509
45+
[#155561]: https://github.com/cockroachdb/cockroach/pull/155561
46+
[#155077]: https://github.com/cockroachdb/cockroach/pull/155077
47+
[#155366]: https://github.com/cockroachdb/cockroach/pull/155366
48+
[#155415]: https://github.com/cockroachdb/cockroach/pull/155415
49+
[#155528]: https://github.com/cockroachdb/cockroach/pull/155528

src/current/_includes/v25.4/sidebar-data/sql.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
"/${VERSION}/alter-default-privileges.html"
4141
]
4242
},
43+
{
44+
"title": "<code>ALTER EXTERNAL CONNECTION</code>",
45+
"urls": [
46+
"/${VERSION}/alter-external-connection.html"
47+
]
48+
},
4349
{
4450
"title": "<code>ALTER FUNCTION</code>",
4551
"urls": [

src/current/v23.2/architecture/life-of-a-distributed-transaction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ The batch evaluator ensures that write operations are valid. Our architecture ma
116116

117117
If the write operation is valid according to the evaluator, the leaseholder sends a provisional acknowledgment to the gateway node's `DistSender`; this lets the `DistSender` begin to send its subsequent `BatchRequests` for this range.
118118

119-
Importantly, this feature is entirely built for transactional optimization (known as [transaction pipelining]({% link {{ page.version.version }}/architecture/transaction-layer.md %}#transaction-pipelining)). There are no issues if an operation passes the evaluator but doesn't end up committing.
119+
Importantly, this feature is entirely built for transactional optimization (known as [transaction pipelining]({% link {{ page.version.version }}/architecture/transaction-layer.md %}#transaction-pipelining)). For important caveats about what pipelining does and does not change in end-to-end latency, see that section. There are no issues if an operation passes the evaluator but doesn't end up committing.
120120

121121
### Reads from the storage layer
122122

src/current/v23.2/architecture/transaction-layer.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ The check is done by keeping track of all the reads using a dedicated `RefreshRe
338338

339339
### Transaction pipelining
340340

341-
Transactional writes are pipelined when being replicated and when being written to disk, dramatically reducing the latency of transactions that perform multiple writes. For example, consider the following transaction:
341+
Transactional writes are pipelined when being [replicated]({% link {{ page.version.version }}/architecture/replication-layer.md %}) and when being written to disk, dramatically reducing the latency of transactions that perform multiple writes. For example, consider the following transaction:
342342

343343
{% include_cached copy-clipboard.html %}
344344
~~~ sql
@@ -350,19 +350,21 @@ INSERT into kv (key, value) VALUES ('orange', 'orange');
350350
COMMIT;
351351
~~~
352352

353-
With transaction pipelining, write intents are replicated from leaseholders in parallel, so the waiting all happens at the end, at transaction commit time.
353+
With transaction pipelining, [write intents](#write-intents) are replicated from [leaseholders]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-leaseholder) in parallel, so most of the waiting happens at the end, at transaction commit time.
354354

355355
At a high level, transaction pipelining works as follows:
356356

357-
1. For each statement, the transaction gateway node communicates with the leaseholders (*L*<sub>1</sub>, *L*<sub>2</sub>, *L*<sub>3</sub>, ..., *L*<sub>i</sub>) for the ranges it wants to write to. Since the primary keys in the table above are UUIDs, the ranges are probably split across multiple leaseholders (this is a good thing, as it decreases [transaction conflicts](#transaction-conflicts)).
357+
1. For each statement, the transaction gateway node communicates with the leaseholders (*L*<sub>1</sub>, *L*<sub>2</sub>, *L*<sub>3</sub>, ..., *L*<sub>i</sub>) for the [ranges]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-range) it wants to write to. Since the [primary keys]({% link {{ page.version.version }}/primary-key.md %}) in the table above are UUIDs, the ranges are probably split across multiple leaseholders (this is a good thing, as it decreases [transaction conflicts](#transaction-conflicts)).
358358

359-
1. Each leaseholder *L*<sub>i</sub> receives the communication from the transaction gateway node and does the following in parallel:
359+
1. Each leaseholder *L*<sub>i</sub> receives the communication from the transaction [gateway node]({% link {{ page.version.version }}/architecture/sql-layer.md %}#gateway-node) and does the following in parallel:
360360
- Creates write intents and sends them to its follower nodes.
361361
- Responds to the transaction gateway node that the write intents have been sent. Note that replication of the intents is still in-flight at this stage.
362362

363363
1. When attempting to commit, the transaction gateway node then waits for the write intents to be replicated in parallel to all of the leaseholders' followers. When it receives responses from the leaseholders that the write intents have propagated, it commits the transaction.
364364

365-
In terms of the SQL snippet shown above, all of the waiting for write intents to propagate and be committed happens once, at the very end of the transaction, rather than for each individual write. This means that the cost of multiple writes is not `O(n)` in the number of SQL DML statements; instead, it's `O(1)`.
365+
In terms of the SQL snippet shown above, all of the waiting for write intents to propagate and be committed happens once, at the very end of the transaction, rather than for each individual write. This means the consensus-related waiting is not `O(n)` in the number of SQL DML statements; instead, it approaches `O(1)`.
366+
367+
However, client-observed latency still includes a certain amount of per-statement work that must be performed. For example, although transaction pipelining parallelizes the [Raft]({% link {{ page.version.version }}/architecture/replication-layer.md %}#raft) consensus work for [write intents](#write-intents) across statements, each statement must be [planned and evaluated]({% link {{ page.version.version }}/architecture/sql-layer.md %}). This includes scanning [indexes]({% link {{ page.version.version }}/indexes.md %}), checking [constraints]({% link {{ page.version.version }}/constraints.md %}), detecting [conflicts](#transaction-conflicts), and waiting on [contending writes]({% link {{ page.version.version }}/performance-best-practices-overview.md %}#understanding-and-avoiding-transaction-contention). The client still submits statements sequentially. Statements that touch the same rows can also create pipeline stalls to preserve [read-your-writes](https://jepsen.io/consistency/models/read-your-writes) ordering. As a result, while the consensus component of write latency can approach `O(1)` with respect to the number of statements, end-to-end transaction latency can still increase with the number of statements.
366368

367369
### Parallel Commits
368370

src/current/v24.1/architecture/life-of-a-distributed-transaction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ The batch evaluator ensures that write operations are valid. Our architecture ma
116116

117117
If the write operation is valid according to the evaluator, the leaseholder sends a provisional acknowledgment to the gateway node's `DistSender`; this lets the `DistSender` begin to send its subsequent `BatchRequests` for this range.
118118

119-
Importantly, this feature is entirely built for transactional optimization (known as [transaction pipelining]({% link {{ page.version.version }}/architecture/transaction-layer.md %}#transaction-pipelining)). There are no issues if an operation passes the evaluator but doesn't end up committing.
119+
Importantly, this feature is entirely built for transactional optimization (known as [transaction pipelining]({% link {{ page.version.version }}/architecture/transaction-layer.md %}#transaction-pipelining)). For important caveats about what pipelining does and does not change in end-to-end latency, see that section. There are no issues if an operation passes the evaluator but doesn't end up committing.
120120

121121
### Reads from the storage layer
122122

src/current/v24.1/architecture/transaction-layer.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ The check is done by keeping track of all the reads using a dedicated `RefreshRe
338338

339339
### Transaction pipelining
340340

341-
Transactional writes are pipelined when being replicated and when being written to disk, dramatically reducing the latency of transactions that perform multiple writes. For example, consider the following transaction:
341+
Transactional writes are pipelined when being [replicated]({% link {{ page.version.version }}/architecture/replication-layer.md %}) and when being written to disk, dramatically reducing the latency of transactions that perform multiple writes. For example, consider the following transaction:
342342

343343
{% include_cached copy-clipboard.html %}
344344
~~~ sql
@@ -350,19 +350,21 @@ INSERT into kv (key, value) VALUES ('orange', 'orange');
350350
COMMIT;
351351
~~~
352352

353-
With transaction pipelining, write intents are replicated from leaseholders in parallel, so the waiting all happens at the end, at transaction commit time.
353+
With transaction pipelining, [write intents](#write-intents) are replicated from [leaseholders]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-leaseholder) in parallel, so most of the waiting happens at the end, at transaction commit time.
354354

355355
At a high level, transaction pipelining works as follows:
356356

357-
1. For each statement, the transaction gateway node communicates with the leaseholders (*L*<sub>1</sub>, *L*<sub>2</sub>, *L*<sub>3</sub>, ..., *L*<sub>i</sub>) for the ranges it wants to write to. Since the primary keys in the table above are UUIDs, the ranges are probably split across multiple leaseholders (this is a good thing, as it decreases [transaction conflicts](#transaction-conflicts)).
357+
1. For each statement, the transaction gateway node communicates with the leaseholders (*L*<sub>1</sub>, *L*<sub>2</sub>, *L*<sub>3</sub>, ..., *L*<sub>i</sub>) for the [ranges]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-range) it wants to write to. Since the [primary keys]({% link {{ page.version.version }}/primary-key.md %}) in the table above are UUIDs, the ranges are probably split across multiple leaseholders (this is a good thing, as it decreases [transaction conflicts](#transaction-conflicts)).
358358

359-
1. Each leaseholder *L*<sub>i</sub> receives the communication from the transaction gateway node and does the following in parallel:
359+
1. Each leaseholder *L*<sub>i</sub> receives the communication from the transaction [gateway node]({% link {{ page.version.version }}/architecture/sql-layer.md %}#gateway-node) and does the following in parallel:
360360
- Creates write intents and sends them to its follower nodes.
361361
- Responds to the transaction gateway node that the write intents have been sent. Note that replication of the intents is still in-flight at this stage.
362362

363363
1. When attempting to commit, the transaction gateway node then waits for the write intents to be replicated in parallel to all of the leaseholders' followers. When it receives responses from the leaseholders that the write intents have propagated, it commits the transaction.
364364

365-
In terms of the SQL snippet shown above, all of the waiting for write intents to propagate and be committed happens once, at the very end of the transaction, rather than for each individual write. This means that the cost of multiple writes is not `O(n)` in the number of SQL DML statements; instead, it's `O(1)`.
365+
In terms of the SQL snippet shown above, all of the waiting for write intents to propagate and be committed happens once, at the very end of the transaction, rather than for each individual write. This means the consensus-related waiting is not `O(n)` in the number of SQL DML statements; instead, it approaches `O(1)`.
366+
367+
However, client-observed latency still includes a certain amount of per-statement work that must be performed. For example, although transaction pipelining parallelizes the [Raft]({% link {{ page.version.version }}/architecture/replication-layer.md %}#raft) consensus work for [write intents](#write-intents) across statements, each statement must be [planned and evaluated]({% link {{ page.version.version }}/architecture/sql-layer.md %}). This includes scanning [indexes]({% link {{ page.version.version }}/indexes.md %}), checking [constraints]({% link {{ page.version.version }}/constraints.md %}), detecting [conflicts](#transaction-conflicts), and waiting on [contending writes]({% link {{ page.version.version }}/performance-best-practices-overview.md %}#understanding-and-avoiding-transaction-contention). The client still submits statements sequentially. Statements that touch the same rows can also create pipeline stalls to preserve [read-your-writes](https://jepsen.io/consistency/models/read-your-writes) ordering. As a result, while the consensus component of write latency can approach `O(1)` with respect to the number of statements, end-to-end transaction latency can still increase with the number of statements.
366368

367369
### Parallel Commits
368370

0 commit comments

Comments
 (0)