Skip to content

Commit a64a05c

Browse files
committed
v25.2
1 parent d4b7afe commit a64a05c

7 files changed

+6
-51
lines changed

src/current/v25.2/cockroachdb-feature-availability.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ The [`VECTOR`]({% link {{ page.version.version }}/vector.md %}) data type stores
8787

8888
[Organizing CockroachDB {{ site.data.products.cloud }} clusters using folders]({% link cockroachcloud/folders.md %}) is in preview. Folders allow you to organize and manage access to your clusters according to your organization's requirements. For example, you can create top-level folders for each business unit in your organization, and within those folders, organize clusters by geographic location and then by level of maturity, such as production, staging, and testing.
8989

90-
### Logical data replication (LDR) for CockroachDB {{ site.data.products.core }}
91-
92-
**Logical data replication (LDR)** continuously replicates tables between active CockroachDB clusters. Both source and destination cluster can receive application reads and writes, with LDR enabling bidirectional replication for eventual consistency in the replicating tables. The active-active setup between clusters can provide protection against cluster, datacenter, or region failure while still achieving single-region low latency reads and writes in the individual CockroachDB clusters. Setting up LDR between a source and destination CockroachDB {{ site.data.products.core }} cluster is in preview.
93-
9490
### Read on standby cluster in physical cluster replication (PCR) for CockroachDB {{ site.data.products.core }}
9591

9692
The [`READ VIRTUAL CLUSTER`]({% link {{ page.version.version }}/create-virtual-cluster.md %}#options) option allows you to set up a PCR stream that also creates a read-only virtual cluster on the standby cluster. You can create a PCR job as per the [Set Up Physical Cluster Replication]({% link {{ page.version.version }}/set-up-physical-cluster-replication.md %}) guide and then add the option to the [`CREATE VIRTUAL CLUSTER`]({% link {{ page.version.version }}/create-virtual-cluster.md %}) statement.

src/current/v25.2/create-logical-replication-stream.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ toc: true
55
---
66

77
{{site.data.alerts.callout_info}}
8-
{% include feature-phases/preview.md %}
9-
108
Logical data replication is only supported in CockroachDB {{ site.data.products.core }} clusters.
119
{{site.data.alerts.end}}
1210

@@ -66,14 +64,6 @@ Option | Description
6664
`cursor` | Emits any changes after the specified timestamp. LDR will not perform an initial backfill with the `cursor` option, it will stream any changes after the specified timestamp. The LDR job will encounter an error if you specify a `cursor` timestamp that is before the configured [garbage collection]({% link {{ page.version.version }}/architecture/storage-layer.md %}#garbage-collection) window for that table. **Warning:** Apply the `cursor` option carefully to LDR streams. Using a timestamp in error could cause data loss.
6765
<a id="discard-ttl-deletes-option"></a>`discard` | ([**Unidirectional LDR only**]({% link {{ page.version.version }}/logical-data-replication-overview.md %}#use-cases)) Ignore [TTL deletes]({% link {{ page.version.version }}/row-level-ttl.md %}) in an LDR stream with `discard = ttl-deletes`. **Note**: To ignore row-level TTL deletes in an LDR stream, it is necessary to set the [`ttl_disable_changefeed_replication`]({% link {{ page.version.version }}/row-level-ttl.md %}#ttl-storage-parameters) storage parameter on the source table. Refer to the [Ignore row-level TTL deletes](#ignore-row-level-ttl-deletes) example.
6866
`label` | Tracks LDR metrics at the job level. Add a user-specified string with `label`. Refer to [Metrics labels]({% link {{ page.version.version }}/logical-data-replication-monitoring.md %}#metrics-labels).
69-
`mode` | Determines how LDR replicates the data to the destination cluster. Possible values: `immediate`, `validated`. For more details, refer to [LDR modes](#ldr-modes).
70-
71-
## LDR modes
72-
73-
_Modes_ determine how LDR replicates the data to the destination cluster. There are two modes:
74-
75-
- `immediate` (default): {% include {{ page.version.version }}/ldr/immediate-description.md %}
76-
- `validated`: {% include {{ page.version.version }}/ldr/validated-description.md %}
7767

7868
## Bidirectional LDR
7969

src/current/v25.2/create-logically-replicated.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ toc: true
55
---
66

77
{{site.data.alerts.callout_info}}
8-
{% include feature-phases/preview.md %}
9-
108
Logical data replication is only supported in CockroachDB {{ site.data.products.core }} clusters.
119
{{site.data.alerts.end}}
1210

@@ -81,14 +79,6 @@ Option | Description
8179
-------+------------
8280
`bidirectional on` / `unidirectional` | (**Required**) Specifies whether the LDR stream will be unidirectional or bidirectional. With `bidirectional on` specified, LDR will set up two LDR streams between the clusters. Refer to the examples for [unidirectional](#unidirectional) and [bidirectional](#bidirectional).
8381
`label` | Tracks LDR metrics at the job level. Add a user-specified string with `label`. For more details, refer to [Metrics labels]({% link {{ page.version.version }}/logical-data-replication-monitoring.md %}#metrics-labels).
84-
`mode` | Determines how LDR replicates the data to the destination cluster. Possible values: `immediate`, `validated`. For more details, refer to [LDR modes](#ldr-modes).
85-
86-
## LDR modes
87-
88-
_Modes_ determine how LDR replicates the data to the destination cluster. There are two modes:
89-
90-
- `immediate` (default): {% include {{ page.version.version }}/ldr/immediate-description.md %}
91-
- `validated`: {% include {{ page.version.version }}/ldr/validated-description.md %}
9282

9383
## Examples
9484

@@ -100,7 +90,7 @@ From the destination cluster of the LDR stream, run:
10090

10191
{% include_cached copy-clipboard.html %}
10292
~~~ sql
103-
CREATE LOGICALLY REPLICATED TABLE {database.public.destination_table_name} FROM TABLE {database.public.source_table_name} ON 'external://source' WITH unidirectional, mode=validated;
93+
CREATE LOGICALLY REPLICATED TABLE {database.public.destination_table_name} FROM TABLE {database.public.source_table_name} ON 'external://source' WITH unidirectional;
10494
~~~
10595

10696
Include the following:

src/current/v25.2/logical-data-replication-monitoring.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ docs_area: manage
66
---
77

88
{{site.data.alerts.callout_info}}
9-
{% include feature-phases/preview.md %}
10-
119
Logical data replication is only supported in CockroachDB {{ site.data.products.core }} clusters.
1210
{{site.data.alerts.end}}
1311

src/current/v25.2/logical-data-replication-overview.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Isolate critical application workloads from non-critical application workloads.
4444
- **Table-level replication**: When you initiate LDR, it will replicate all of the source table's existing data to the destination table. From then on, LDR will replicate the source table's data to the destination table to achieve eventual consistency.
4545
- **Last write wins conflict resolution**: LDR uses [_last write wins (LWW)_ conflict resolution]({% link {{ page.version.version }}/manage-logical-data-replication.md %}#conflict-resolution), which will use the latest [MVCC]({% link {{ page.version.version }}/architecture/storage-layer.md %}#mvcc) timestamp to resolve a conflict in row insertion.
4646
- **Dead letter queue (DLQ)**: When LDR starts, the job will create a [DLQ table]({% link {{ page.version.version }}/manage-logical-data-replication.md %}#dead-letter-queue-dlq) with each replicating table in order to track unresolved conflicts. You can interact and manage this table like any other SQL table.
47-
- **Replication modes**: LDR offers different [_modes_]({% link {{ page.version.version }}/create-logical-replication-stream.md %}#ldr-modes) that apply data differently during replication, which allows you to consider optimizing for throughput or constraints during replication.
4847
- **Monitoring**: To [monitor]({% link {{ page.version.version }}/logical-data-replication-monitoring.md %}) LDR's initial progress, current status, and performance, you can view metrics available in the DB Console, Prometheus, and Metrics Export.
4948

5049
## Get started

src/current/v25.2/manage-logical-data-replication.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ toc: true
55
---
66

77
{{site.data.alerts.callout_info}}
8-
{% include feature-phases/preview.md %}
9-
108
Logical data replication is only supported in CockroachDB {{ site.data.products.core }} clusters.
119
{{site.data.alerts.end}}
1210

@@ -22,7 +20,7 @@ In LDR, conflicts are detected at both the [KV]({% link {{ page.version.version
2220

2321
### KV level conflicts
2422

25-
LDR uses _last write wins (LWW)_ conflict resolution based on the [MVCC timestamp]({% link {{ page.version.version }}/architecture/storage-layer.md %}#mvcc) of the replicating write. LDR will resolve conflicts by inserting the row with the latest MVCC timestamp. Conflicts at the KV level are detected in both `immediate` and `validated` mode.
23+
LDR uses _last write wins (LWW)_ conflict resolution based on the [MVCC timestamp]({% link {{ page.version.version }}/architecture/storage-layer.md %}#mvcc) of the replicating write. LDR will resolve conflicts by inserting the row with the latest MVCC timestamp.
2624

2725
Conflicts at the KV level are detected when there is either:
2826

@@ -31,21 +29,16 @@ Conflicts at the KV level are detected when there is either:
3129

3230
### SQL level conflicts
3331

34-
In `validated` mode, when a conflict cannot apply due to violating [constraints]({% link {{ page.version.version }}/constraints.md %}), for example, a foreign key constraint or schema constraint, it will be retried for up to a minute and then put in the [DLQ](#dead-letter-queue-dlq) if it could not be resolved.
32+
When a conflict cannot apply due to violating [constraints]({% link {{ page.version.version }}/constraints.md %}), for example, a foreign key constraint or schema constraint, LDR will send the row to the [DLQ](#dead-letter-queue-dlq).
3533

3634
### Dead letter queue (DLQ)
3735

38-
When the LDR job starts, it will create a DLQ table with each replicating table so that unresolved conflicts can be tracked. The DLQ will contain the writes that LDR cannot apply after the retry period, which could occur if:
36+
When the LDR job starts, it will create a DLQ table with each replicating table so that unresolved conflicts can be tracked. The DLQ will contain the writes that LDR cannot apply after the retry period of a minute, which could occur if:
3937

4038
- The destination table was dropped.
4139
- The destination cluster is unavailable.
4240
- Tables schemas do not match.
4341

44-
In `validated` mode, rows are also sent to the DLQ when:
45-
46-
- [Foreign key]({% link {{ page.version.version }}/foreign-key.md %}) dependencies are not met where there are foreign key constraints in the schema.
47-
- Unique indexes and other constraints are not met.
48-
4942
{{site.data.alerts.callout_info}}
5043
LDR will not pause when the writes are sent to the DLQ, you must manage the DLQ manually.
5144
{{site.data.alerts.end}}

src/current/v25.2/set-up-logical-data-replication.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ toc: true
55
---
66

77
{{site.data.alerts.callout_info}}
8-
{% include feature-phases/preview.md %}
9-
108
Logical data replication is only supported in CockroachDB {{ site.data.products.core }} clusters.
119
{{site.data.alerts.end}}
1210

@@ -39,7 +37,7 @@ If you're setting up bidirectional LDR, both clusters will act as a source and a
3937

4038
1. Prepare the clusters with the required settings, users, and privileges according to the LDR setup.
4139
1. Set up [external connection(s)]({% link {{ page.version.version }}/create-external-connection.md %}) on the destination to hold the connection URI for the source.
42-
1. Start LDR from the destination cluster with your required modes and syntax.
40+
1. Start LDR from the destination cluster with your required syntax and options.
4341
1. Check the status of the LDR job in the [DB Console]({% link {{ page.version.version }}/ui-overview.md %}).
4442

4543
## Before you begin
@@ -62,16 +60,14 @@ You cannot use LDR on a table with a schema that contains:
6260
- [Partial indexes]({% link {{ page.version.version }}/partial-indexes.md %}) and [hash-sharded indexes]({% link {{ page.version.version }}/hash-sharded-indexes.md %})
6361
- Indexes with a [virtual computed column]({% link {{ page.version.version }}/computed-columns.md %})
6462
- Composite types in the [primary key]({% link {{ page.version.version }}/primary-key.md %})
63+
- [Foreign key]({% link {{ page.version.version }}/foreign-key.md %}) dependencies
6564

6665
Additionally, for the `CREATE LOGICALLY REPLICATED` syntax, you cannot use LDR on a table with a schema that contains:
6766

6867
- [User-defined types]({% link {{ page.version.version }}/enum.md %})
69-
- [Foreign key]({% link {{ page.version.version }}/foreign-key.md %}) dependencies
7068

7169
For more details, refer to the LDR [Known limitations]({% link {{ page.version.version }}/logical-data-replication-overview.md %}#known-limitations).
7270

73-
When you run LDR in [`immediate` mode](#modes), you cannot replicate a table with [foreign key constraints]({% link {{ page.version.version }}/foreign-key.md %}). In [`validated` mode](#modes), foreign key constraints **must** match. All constraints are enforced at the time of SQL/application write.
74-
7571
## Step 1. Prepare the cluster
7672

7773
In this step you'll prepare the required settings and privileges for LDR.
@@ -186,11 +182,6 @@ You can use the `cockroach encode-uri` command to generate a connection string c
186182

187183
In this step, you'll start the LDR stream(s) from the destination cluster. You can replicate one or multiple tables in a single LDR job. You cannot replicate system tables in LDR, which means that you must manually apply configurations and cluster settings, such as [row-level TTL]({% link {{ page.version.version }}/row-level-ttl.md %}) and user permissions on the destination cluster.
188184
189-
<a id="modes"></a>_Modes_ determine how LDR replicates the data to the destination cluster. There are two modes:
190-
191-
- `immediate` (default): {% include {{ page.version.version }}/ldr/immediate-description.md %}
192-
- `validated`: {% include {{ page.version.version }}/ldr/validated-description.md %}
193-
194185
LDR streams can be started using one of the following sections for instructions on creating an LDR stream. For details on which syntax to use, refer to the [Syntax](#syntax) section at the beginning of this tutorial:
195186
196187
- [`CREATE LOGICALLY REPLICATED`](#create-logically-replicated)
@@ -234,8 +225,6 @@ Ensure you've created the table on the destination cluster with a matching schem
234225
CREATE LOGICAL REPLICATION STREAM FROM TABLE {database.public.source_table_name} ON 'external://{source_external_connection}' INTO TABLE {database.public.destination_table_name};
235226
~~~
236227

237-
You can change the default `mode` using the `WITH mode = validated` syntax.
238-
239228
If you would like to add multiple tables to the LDR job, ensure that the table name in the source table list and destination table list are in the same order:
240229

241230
{% include_cached copy-clipboard.html %}

0 commit comments

Comments
 (0)