Skip to content

Commit b433e3d

Browse files
committed
Alicia feedback
1 parent 9c4442c commit b433e3d

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

src/current/v24.3/set-up-logical-data-replication.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ LDR does not support replicating a table with [foreign key constraints]({% link
5656

5757
#### Unique secondary indexes
5858

59-
LDR cannot guarantee that the [_dead letter queue_ (DLQ)]({% link {{ page.version.version }}/manage-logical-data-replication.md %}) will remain empty if the destination table has a unique [secondary index]({% link {{ page.version.version }}/schema-design-indexes.md %}). The two clusters in LDR operate independently, so writes to one cluster can conflict with writes to the other.
59+
When the destination table includes unique [secondary indexes]({% link {{ page.version.version }}/schema-design-indexes.md %}), it can cause rows to enter the [_dead letter queue_ (DLQ)]({% link {{ page.version.version }}/manage-logical-data-replication.md %}). The two clusters in LDR operate independently, so writes to one cluster can conflict with writes to the other.
6060

6161
If the application modifies the same row in both clusters, LDR resolves the conflict using _last write wins_ (LWW) conflict resolution. [`UNIQUE` constraints]({% link {{ page.version.version }}/unique.md %}) are validated locally in each cluster, therefore if a replicated write violates a `UNIQUE` constraint on the destination cluster (possibly because a conflicting write was already applied to the row) the replicating row will be applied to the DLQ.
6262

@@ -66,6 +66,7 @@ On the **source cluster**:
6666

6767
{% include_cached copy-clipboard.html %}
6868
~~~ sql
69+
-- writes to the source table
6970
INSERT INTO city (1, nyc); -- timestamp 1
7071
UPDATE city SET name = 'philly' WHERE id = 1; -- timestamp 2
7172
INSERT INTO city (100, nyc); -- timestamp 3
@@ -75,22 +76,25 @@ LDR replicates the write to the **destination cluster**:
7576

7677
{% include_cached copy-clipboard.html %}
7778
~~~ sql
79+
-- replicates to the destination table
7880
INSERT INTO city (100, nyc); -- timestamp 4
7981
~~~
8082

8183
_Timestamp 5:_ Range containing primary key `1` on the destination cluster is unavailable for a few minutes due to a network partition.
8284

83-
_Timestamp 6:_ On the destination cluster, LDR attempts to replicate the row `(1, nyc)`, but it enters the retry queue for 1 minute due to the unavailable range. LDR adds `1, nyc` to the DLQ after having retried for 1 minute and observing the `UNIQUE` constraint violation:
85+
_Timestamp 6:_ On the destination cluster, LDR attempts to replicate the row `(1, nyc)`, but it enters the retry queue for 1 minute due to the unavailable range. LDR adds `1, nyc` to the DLQ table after retrying and observing the `UNIQUE` constraint violation:
8486

8587
{% include_cached copy-clipboard.html %}
8688
~~~ sql
89+
-- writes to the DLQ
8790
INSERT INTO city (1, nyc); -- timestamp 6
8891
~~~
8992

90-
_Timestamp 7:_ LDR continues replication writes:
93+
_Timestamp 7:_ LDR continues to replicate writes:
9194

9295
{% include_cached copy-clipboard.html %}
9396
~~~ sql
97+
-- replicates to the destination table
9498
INSERT INTO city (1, philly); -- timestamp 7
9599
~~~
96100

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ For more details, refer to the LDR [Known limitations]({% link {{ page.version.v
6262

6363
#### Unique secondary indexes
6464

65-
LDR cannot guarantee that the [_dead letter queue_ (DLQ)]({% link {{ page.version.version }}/manage-logical-data-replication.md %}) will remain empty if the destination table has a unique [secondary index]({% link {{ page.version.version }}/schema-design-indexes.md %}). The two clusters in LDR operate independently, so writes to one cluster can conflict with writes to the other.
65+
When the destination table includes unique [secondary indexes]({% link {{ page.version.version }}/schema-design-indexes.md %}), it can cause rows to enter the [_dead letter queue_ (DLQ)]({% link {{ page.version.version }}/manage-logical-data-replication.md %}). The two clusters in LDR operate independently, so writes to one cluster can conflict with writes to the other.
6666

6767
If the application modifies the same row in both clusters, LDR resolves the conflict using _last write wins_ (LWW) conflict resolution. [`UNIQUE` constraints]({% link {{ page.version.version }}/unique.md %}) are validated locally in each cluster, therefore if a replicated write violates a `UNIQUE` constraint on the destination cluster (possibly because a conflicting write was already applied to the row) the replicating row will be applied to the DLQ.
6868

@@ -72,6 +72,7 @@ On the **source cluster**:
7272

7373
{% include_cached copy-clipboard.html %}
7474
~~~ sql
75+
-- writes to the source table
7576
INSERT INTO city (1, nyc); -- timestamp 1
7677
UPDATE city SET name = 'philly' WHERE id = 1; -- timestamp 2
7778
INSERT INTO city (100, nyc); -- timestamp 3
@@ -81,22 +82,25 @@ LDR replicates the write to the **destination cluster**:
8182

8283
{% include_cached copy-clipboard.html %}
8384
~~~ sql
85+
-- replicates to the destination table
8486
INSERT INTO city (100, nyc); -- timestamp 4
8587
~~~
8688

8789
_Timestamp 5:_ Range containing primary key `1` on the destination cluster is unavailable for a few minutes due to a network partition.
8890

89-
_Timestamp 6:_ On the destination cluster, LDR attempts to replicate the row `(1, nyc)`, but it enters the retry queue for 1 minute due to the unavailable range. LDR adds `1, nyc` to the DLQ after having retried for 1 minute and observing the `UNIQUE` constraint violation:
91+
_Timestamp 6:_ On the destination cluster, LDR attempts to replicate the row `(1, nyc)`, but it enters the retry queue for 1 minute due to the unavailable range. LDR adds `1, nyc` to the DLQ table after retrying and observing the `UNIQUE` constraint violation:
9092

9193
{% include_cached copy-clipboard.html %}
9294
~~~ sql
95+
-- writes to the DLQ
9396
INSERT INTO city (1, nyc); -- timestamp 6
9497
~~~
9598

96-
_Timestamp 7:_ LDR continues replication writes:
99+
_Timestamp 7:_ LDR continues to replicate writes:
97100

98101
{% include_cached copy-clipboard.html %}
99102
~~~ sql
103+
-- replicates to the destination table
100104
INSERT INTO city (1, philly); -- timestamp 7
101105
~~~
102106

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ For more details, refer to the LDR [Known limitations]({% link {{ page.version.v
7070

7171
#### Unique secondary indexes
7272

73-
LDR cannot guarantee that the [_dead letter queue_ (DLQ)]({% link {{ page.version.version }}/manage-logical-data-replication.md %}) will remain empty if the destination table has a unique [secondary index]({% link {{ page.version.version }}/schema-design-indexes.md %}). The two clusters in LDR operate independently, so writes to one cluster can conflict with writes to the other.
73+
When the destination table includes unique [secondary indexes]({% link {{ page.version.version }}/schema-design-indexes.md %}), it can cause rows to enter the [_dead letter queue_ (DLQ)]({% link {{ page.version.version }}/manage-logical-data-replication.md %}). The two clusters in LDR operate independently, so writes to one cluster can conflict with writes to the other.
7474

7575
If the application modifies the same row in both clusters, LDR resolves the conflict using _last write wins_ (LWW) conflict resolution. [`UNIQUE` constraints]({% link {{ page.version.version }}/unique.md %}) are validated locally in each cluster, therefore if a replicated write violates a `UNIQUE` constraint on the destination cluster (possibly because a conflicting write was already applied to the row) the replicating row will be applied to the DLQ.
7676

@@ -80,6 +80,7 @@ On the **source cluster**:
8080

8181
{% include_cached copy-clipboard.html %}
8282
~~~ sql
83+
-- writes to the source table
8384
INSERT INTO city (1, nyc); -- timestamp 1
8485
UPDATE city SET name = 'philly' WHERE id = 1; -- timestamp 2
8586
INSERT INTO city (100, nyc); -- timestamp 3
@@ -89,22 +90,25 @@ LDR replicates the write to the **destination cluster**:
8990

9091
{% include_cached copy-clipboard.html %}
9192
~~~ sql
93+
-- replicates to the destination table
9294
INSERT INTO city (100, nyc); -- timestamp 4
9395
~~~
9496

9597
_Timestamp 5:_ Range containing primary key `1` on the destination cluster is unavailable for a few minutes due to a network partition.
9698

97-
_Timestamp 6:_ On the destination cluster, LDR attempts to replicate the row `(1, nyc)`, but it enters the retry queue for 1 minute due to the unavailable range. LDR adds `1, nyc` to the DLQ after having retried for 1 minute and observing the `UNIQUE` constraint violation:
99+
_Timestamp 6:_ On the destination cluster, LDR attempts to replicate the row `(1, nyc)`, but it enters the retry queue for 1 minute due to the unavailable range. LDR adds `1, nyc` to the DLQ table after retrying and observing the `UNIQUE` constraint violation:
98100

99101
{% include_cached copy-clipboard.html %}
100102
~~~ sql
103+
-- writes to the DLQ
101104
INSERT INTO city (1, nyc); -- timestamp 6
102105
~~~
103106

104-
_Timestamp 7:_ LDR continues replication writes:
107+
_Timestamp 7:_ LDR continues to replicate writes:
105108

106109
{% include_cached copy-clipboard.html %}
107110
~~~ sql
111+
-- replicates to the destination table
108112
INSERT INTO city (1, philly); -- timestamp 7
109113
~~~
110114

0 commit comments

Comments
 (0)