Skip to content

Commit

Permalink
[doc][xcluster] Truncate limitation (#23833)
Browse files Browse the repository at this point in the history
* DOC-460

* review comment

* stable

* stable
  • Loading branch information
ddhodge authored Sep 11, 2024
1 parent be0d1d1 commit aec9a66
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ xCluster currently supports active-active single-master and active-active multi-

### Active-active single-master

Here the replication is unidirectional from a source universe to a target universe. The target universe is typically located in data centers or regions that are different from the source universe. The source universe can serve both reads and writes. The target universe can only serve reads. Since only the nodes in one universe can take writes this mode is referred to as single master. Note that within the source universe all nodes can serve writes.
In this setup the replication is unidirectional from a source universe to a target universe. The target universe is typically located in data centers or regions that are different from the source universe. The source universe can serve both reads and writes. The target universe can only serve reads. Since only the nodes in one universe can take writes this mode is referred to as single master. Note that within the source universe all nodes can serve writes.

Usually, such deployments are used for serving low-latency reads from the target universes, as well as for disaster recovery purposes. When used primarily for disaster recovery purposes, these deployments are also called active-standby because the target universe stands by to take over if the source universe is lost.

Expand Down Expand Up @@ -243,7 +243,7 @@ After losing one universe, the other universe may be left with torn transactions

### Transactional-mode limitations

With transactional mode,
Transactional mode has the following limitations:

- No writes are allowed in the target universe
- Active-active multi-master is not supported
Expand All @@ -259,7 +259,7 @@ When the source universe is lost, an explicit decision must be made to switch ov
### DDL changes

- Currently, DDL changes are not automatically replicated. Applying commands such as `CREATE TABLE`, `ALTER TABLE`, and `CREATE INDEX` to the target universes is your responsibility.
- `DROP TABLE` is not supported. You must first disable replication for this table.
- `DROP TABLE` is not supported in YCQL. You must first disable replication for this table.
- `TRUNCATE TABLE` is not supported. This is an underlying limitation, due to the level at which the two features operate. That is, replication is implemented on top of the Raft WAL files, while truncate is implemented on top of the RocksDB SST files.
- In the future, it will be possible to propagate DDL changes safely to other universes. This is tracked in [#11537](https://github.com/yugabyte/yugabyte-db/issues/11537).

Expand Down
37 changes: 13 additions & 24 deletions docs/content/preview/deploy/multi-dc/async-replication/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,18 @@ By default, YugabyteDB provides synchronous replication and strong consistency a

For information on xCluster deployment architecture, replication scenarios, and limitations, refer to [xCluster replication](../../../architecture/docdb-replication/async-replication/).

<div class="row">
<div class="col-12 col-md-6 col-lg-12 col-xl-6">
<a class="section-link icon-offset" href="async-deployment/">
<div class="head">
<img class="icon" src="/images/section_icons/explore/planet_scale.png" aria-hidden="true" />
<div class="title">Deploy xCluster</div>
</div>
<div class="body">
Set up unidirectional or bidirectional replication.
</div>
</a>
</div>
{{<index/block>}}

<div class="col-12 col-md-6 col-lg-12 col-xl-6">
<a class="section-link icon-offset" href="async-replication-transactional">
<div class="head">
<img class="icon" src="/images/section_icons/explore/planet_scale.png" aria-hidden="true" />
<div class="title">Deploy transactional xCluster</div>
</div>
<div class="body">
Set up transactional unidirectional replication.
</div>
</a>
</div>
{{<index/item
title="Deploy xCluster"
body="Set up unidirectional or bidirectional replication."
href="async-deployment/"
icon="fa-light fa-copy">}}

</div>
{{<index/item
title="Deploy transactional xCluster"
body="Set up transactional unidirectional replication."
href="async-replication-transactional/"
icon="fa-light fa-money-from-bracket">}}

{{</index/block>}}
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ xCluster safe time is the transactionally consistent time across all tables in a

Transactional xCluster can be set up in the following ways:

- [Manual mode](../async-transactional-setup/).
- [Semi-automatic mode](../async-transactional-setup-dblevel/), providing operationally simpler setup and management of replication, as well as simpler steps for performing DDL changes.
- [Manual mode](../async-transactional-setup/).

## Limitations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Blog: [Using YugabyteDB xCluster DR for PostgreSQL Disaster Recovery in Azure](h

## Limitations

- Currently, replication of DDL (SQL-level changes such as creating or dropping tables or indexes) is not supported. To make these changes requires first performing the DDL operation (for example, creating a table), and then adding the new object to replication in YugabyteDB Anywhere. Refer to [Manage tables and indexes](./disaster-recovery-tables/).
- Currently, replication of DDL (SQL-level changes such as creating or dropping tables or indexes) is not supported. To make these changes requires first performing the DDL operation (for example, creating a table), and then adding the new object to replication in YugabyteDB Anywhere. In addition, xCluster does not support truncate operations. Refer to [Manage tables and indexes](./disaster-recovery-tables/).

- DR setup (and other operations that require making a full copy from DR primary to DR replica, such as adding tables with data to replication, resuming replication after an extended network outage, and so on) may fail with the error `database "<database_name>" is being accessed by other users`.

Expand All @@ -74,6 +74,8 @@ Blog: [Using YugabyteDB xCluster DR for PostgreSQL Disaster Recovery in Azure](h

- Setting up DR between a universe upgraded to v2.20.x and a new v2.20.x universe is not supported. This is due to a limitation of xCluster deployments and packed rows. See [Packed row limitations](../../../architecture/docdb/packed-rows/#limitations).

For more information on the YugabyteDB xCluster implementation and its limitations, refer to [xCluster implementation limitations](../../../architecture/docdb-replication/async-replication/#limitations).

## Upgrading universes in DR

When [upgrading universes](../../manage-deployments/upgrade-software-install/) in DR replication, you should upgrade and finalize the DR replica before upgrading and finalizing the DR primary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ In addition, keep in mind the following:

- If you are using Colocated tables, you CREATE TABLE on DR primary, then CREATE TABLE on DR replica making sure that you force the Colocation ID to be identical to that on DR primary.
- If you try to make a DDL change on DR primary and it fails, you must also make the same attempt on DR replica and get the same failure.
- TRUNCATE TABLE is not supported. To truncate a table, pause replication, truncate the table on both primary and standby, and resume replication.

Use the following guidance when managing tables and indexes in universes with DR configured.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Video: [YFTT - Transactional xCluster](https://www.youtube.com/watch?lI6gw7ncBs8

## Limitations

- Currently, replication of DDL (SQL-level changes such as creating or dropping tables or indexes) is not supported. To make these changes requires first performing the DDL operation (for example, creating a table), and then adding the new object to replication in YugabyteDB Anywhere. Refer to [Manage tables and indexes](./xcluster-replication-ddl/).
- Currently, replication of DDL (SQL-level changes such as creating or dropping tables or indexes) is not supported. To make these changes requires first performing the DDL operation (for example, creating a table), and then adding the new object to replication in YugabyteDB Anywhere. In addition, xCluster does not support truncate operations. Refer to [Manage tables and indexes](./xcluster-replication-ddl/).

- xCluster Replication setup (and other operations that require making a [full copy](xcluster-replication-setup/#full-copy-during-xcluster-setup) from source to target) forcefully drop the tables on the target if they exist before performing the restore.

Expand All @@ -99,4 +99,4 @@ Video: [YFTT - Transactional xCluster](https://www.youtube.com/watch?lI6gw7ncBs8

- xCluster Replication is not supported for [materialized views](../../../explore/ysql-language-features/advanced-features/views/#materialized-views).

For more information, refer to [xCluster implementation limitations](../../../architecture/docdb-replication/async-replication/#limitations).
For more information on the YugabyteDB xCluster implementation and its limitations, refer to [xCluster implementation limitations](../../../architecture/docdb-replication/async-replication/#limitations).
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ In addition, keep in mind the following:

- If you are using Colocated tables, you CREATE TABLE on target, then CREATE TABLE on source, making sure that you force the Colocation ID to be identical to that on target.
- If you try to make a DDL change on source and it fails, you must also make the same attempt on target and get the same failure.
- TRUNCATE TABLE is not supported. To truncate a table, pause replication, truncate the table on both source and target, and resume replication.

Use the following guidance when managing tables and indexes in universes with replication configured.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ xCluster currently supports active-active single-master and active-active multi-

### Active-active single-master

Here the replication is unidirectional from a source universe to a target universe. The target universe is typically located in data centers or regions that are different from the source universe. The source universe can serve both reads and writes. The target universe can only serve reads. Since only the nodes in one universe can take writes this mode is referred to as single master. Note that within the source universe all nodes can serve writes.
In this setup the replication is unidirectional from a source universe to a target universe. The target universe is typically located in data centers or regions that are different from the source universe. The source universe can serve both reads and writes. The target universe can only serve reads. Since only the nodes in one universe can take writes this mode is referred to as single master. Note that within the source universe all nodes can serve writes.

Usually, such deployments are used for serving low-latency reads from the target universes, as well as for disaster recovery purposes. When used primarily for disaster recovery purposes, these deployments are also called active-standby because the target universe stands by to take over if the source universe is lost.

Expand Down Expand Up @@ -241,7 +241,7 @@ After losing one universe, the other universe may be left with torn transactions

### Transactional-mode limitations

With transactional mode,
Transactional mode has the following limitations:

- No writes are allowed in the target universe
- Active-active multi-master is not supported
Expand All @@ -257,7 +257,7 @@ When the source universe is lost, an explicit decision must be made to switch ov
### DDL changes

- Currently, DDL changes are not automatically replicated. Applying commands such as `CREATE TABLE`, `ALTER TABLE`, and `CREATE INDEX` to the target universes is your responsibility.
- `DROP TABLE` is not supported. You must first disable replication for this table.
- `DROP TABLE` is not supported in YCQL. You must first disable replication for this table.
- `TRUNCATE TABLE` is not supported. This is an underlying limitation, due to the level at which the two features operate. That is, replication is implemented on top of the Raft WAL files, while truncate is implemented on top of the RocksDB SST files.
- In the future, it will be possible to propagate DDL changes safely to other universes. This is tracked in [#11537](https://github.com/yugabyte/yugabyte-db/issues/11537).

Expand Down
37 changes: 13 additions & 24 deletions docs/content/stable/deploy/multi-dc/async-replication/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,18 @@ By default, YugabyteDB provides synchronous replication and strong consistency a

For information on xCluster deployment architecture, replication scenarios, and limitations, refer to [xCluster replication](../../../architecture/docdb-replication/async-replication/).

<div class="row">
<div class="col-12 col-md-6 col-lg-12 col-xl-6">
<a class="section-link icon-offset" href="async-deployment/">
<div class="head">
<img class="icon" src="/images/section_icons/explore/planet_scale.png" aria-hidden="true" />
<div class="title">Deploy xCluster</div>
</div>
<div class="body">
Set up unidirectional or bidirectional replication.
</div>
</a>
</div>
{{<index/block>}}

<div class="col-12 col-md-6 col-lg-12 col-xl-6">
<a class="section-link icon-offset" href="async-replication-transactional">
<div class="head">
<img class="icon" src="/images/section_icons/explore/planet_scale.png" aria-hidden="true" />
<div class="title">Deploy transactional xCluster</div>
</div>
<div class="body">
Set up transactional unidirectional replication.
</div>
</a>
</div>
{{<index/item
title="Deploy xCluster"
body="Set up unidirectional or bidirectional replication."
href="async-deployment/"
icon="fa-light fa-copy">}}

</div>
{{<index/item
title="Deploy transactional xCluster"
body="Set up transactional unidirectional replication."
href="async-replication-transactional/"
icon="fa-light fa-money-from-bracket">}}

{{</index/block>}}
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ xCluster safe time is the transactionally consistent time across all tables in a

Transactional xCluster can be set up in the following ways:

- [Manual mode](../async-transactional-setup/).
- [Semi-automatic mode](../async-transactional-setup-dblevel/), providing operationally simpler setup and management of replication, as well as simpler steps for performing DDL changes.
- [Manual mode](../async-transactional-setup/).

## Limitations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Blog: [Using YugabyteDB xCluster DR for PostgreSQL Disaster Recovery in Azure](h

## Limitations

- Currently, replication of DDL (SQL-level changes such as creating or dropping tables or indexes) is not supported. To make these changes requires first performing the DDL operation (for example, creating a table), and then adding the new object to replication in YBA. Refer to [Manage tables and indexes](./disaster-recovery-tables/).
- Currently, replication of DDL (SQL-level changes such as creating or dropping tables or indexes) is not supported. To make these changes requires first performing the DDL operation (for example, creating a table), and then adding the new object to replication in YugabyteDB Anywhere. In addition, xCluster does not support truncate operations. Refer to [Manage tables and indexes](./disaster-recovery-tables/).

- DR setup (and other operations that require making a full copy from DR primary to DR replica, such as adding tables with data to replication, resuming replication after an extended network outage, and so on) may fail with the error `database "<database_name>" is being accessed by other users`.

Expand All @@ -74,6 +74,8 @@ Blog: [Using YugabyteDB xCluster DR for PostgreSQL Disaster Recovery in Azure](h

- Setting up DR between a universe upgraded to v2.20.x and a new v2.20.x universe is not supported. This is due to a limitation of xCluster deployments and packed rows. See [Packed row limitations](../../../architecture/docdb/packed-rows/#limitations).

For more information on the YugabyteDB xCluster implementation and its limitations, refer to [xCluster implementation limitations](../../../architecture/docdb-replication/async-replication/#limitations).

## Upgrading universes in DR

When [upgrading universes](../../manage-deployments/upgrade-software-install/) in DR replication, you should upgrade and finalize the DR replica before upgrading and finalizing the DR primary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ In addition, keep in mind the following:

- If you are using Colocated tables, you CREATE TABLE on DR primary, then CREATE TABLE on DR replica making sure that you force the Colocation ID to be identical to that on DR primary.
- If you try to make a DDL change on DR primary and it fails, you must also make the same attempt on DR replica and get the same failure.
- TRUNCATE TABLE is not supported. To truncate a table, pause replication, truncate the table on both primary and standby, and resume replication.

Use the following guidance when managing tables and indexes in universes with DR configured.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Video: [YFTT - Transactional xCluster](https://www.youtube.com/watch?lI6gw7ncBs8

## Limitations

- Currently, replication of DDL (SQL-level changes such as creating or dropping tables or indexes) is not supported. To make these changes requires first performing the DDL operation (for example, creating a table), and then adding the new object to replication in YugabyteDB Anywhere. Refer to [Manage tables and indexes](./xcluster-replication-ddl/).
- Currently, replication of DDL (SQL-level changes such as creating or dropping tables or indexes) is not supported. To make these changes requires first performing the DDL operation (for example, creating a table), and then adding the new object to replication in YugabyteDB Anywhere. In addition, xCluster does not support truncate operations. Refer to [Manage tables and indexes](./xcluster-replication-ddl/).

- xCluster Replication setup (and other operations that require making a [full copy](xcluster-replication-setup/#full-copy-during-xcluster-setup) from source to target) forcefully drop the tables on the target if they exist before performing the restore.

Expand All @@ -99,4 +99,4 @@ Video: [YFTT - Transactional xCluster](https://www.youtube.com/watch?lI6gw7ncBs8

- xCluster Replication is not supported for [materialized views](../../../explore/ysql-language-features/advanced-features/views/#materialized-views).

For more information, refer to [xCluster implementation limitations](../../../architecture/docdb-replication/async-replication/#limitations).
For more information on the YugabyteDB xCluster implementation and its limitations, refer to [xCluster implementation limitations](../../../architecture/docdb-replication/async-replication/#limitations).
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ In addition, keep in mind the following:

- If you are using Colocated tables, you CREATE TABLE on target, then CREATE TABLE on source, making sure that you force the Colocation ID to be identical to that on target.
- If you try to make a DDL change on source and it fails, you must also make the same attempt on target and get the same failure.
- TRUNCATE TABLE is not supported. To truncate a table, pause replication, truncate the table on both source and target, and resume replication.

Use the following guidance when managing tables and indexes in universes with replication configured.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ When the source universe is lost, an explicit decision must be made to switch ov
### DDL changes

- Currently, DDL changes are not automatically replicated. Applying commands such as `CREATE TABLE`, `ALTER TABLE`, and `CREATE INDEX` to the target universes is your responsibility.
- `DROP TABLE` is not supported. You must first disable replication for this table.
- `DROP TABLE` is not supported in YCQL. You must first disable replication for this table.
- `TRUNCATE TABLE` is not supported. This is an underlying limitation, due to the level at which the two features operate. That is, replication is implemented on top of the Raft WAL files, while truncate is implemented on top of the RocksDB SST files.
- In the future, it will be possible to propagate DDL changes safely to other universes. This is tracked in [#11537](https://github.com/yugabyte/yugabyte-db/issues/11537).

Expand Down

0 comments on commit aec9a66

Please sign in to comment.