From 707311c45023d602e0adfe1e9a99d311f3ba446b Mon Sep 17 00:00:00 2001 From: Hari Krishna Sunder Date: Fri, 24 Jan 2025 16:23:39 -0800 Subject: [PATCH] Update 2024.2 doc --- .../async-replication/async-deployment.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/content/stable/deploy/multi-dc/async-replication/async-deployment.md b/docs/content/stable/deploy/multi-dc/async-replication/async-deployment.md index 21d9540d5530..2ea2ebfc920b 100644 --- a/docs/content/stable/deploy/multi-dc/async-replication/async-deployment.md +++ b/docs/content/stable/deploy/multi-dc/async-replication/async-deployment.md @@ -553,12 +553,27 @@ However, to add a new index to a table that already has data, the following addi Replication altered successfully ``` -#### Adding indexes in bidirectional replication +#### Adding YCQL indexes in bidirectional replication -Stop all write traffic when adding a new index to a table that is bidirectionally replicated. +Stop all write traffic when adding a new index to a YCQL table that is bidirectionally replicated. Follow the same steps as described in [Adding indexes in unidirectional replication](#adding-indexes-in-unidirectional-replication), followed by bootstrapping the index on the target universe and adding it to the source universe (steps 4 and 8 in the opposite direction). +#### Adding YSQL indexes in bidirectional replication + +{{< note title="Note" >}} +For versions lower than v2024.2.2.0 follow the same steps as described in [Adding YCQL indexes in bidirectional replication](#adding-ycql-indexes-in-bidirectional-replication). +{{< /note >}} + +New YSQL indexes are automatically added to xCluster replication if the YSQL table being indexed is bidirectionally replicated. +Adding new indexes is supported even if the table being indexed contains data and is actively receiving writes on both the universes. + +Create the [index](../../../../api/ysql/the-sql-language/statements/ddl_create_index/) on both the universes **simultaneously**. xCluster will internally detect and add the new indexes to replication in both directions, and ensure all the data is backfilled. + +{{< note title="Note" >}} +If the create index DDL statement is only issued on one universe, it will timeout and fail. +{{< /note >}} + ### Removing objects Objects (tables, indexes, partitions) need to be removed from replication before they can be dropped as follows: