You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/current/v24.3/set-up-logical-data-replication.md
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ LDR does not support replicating a table with [foreign key constraints]({% link
56
56
57
57
#### Unique secondary indexes
58
58
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.
60
60
61
61
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.
62
62
@@ -66,6 +66,7 @@ On the **source cluster**:
66
66
67
67
{% include_cached copy-clipboard.html %}
68
68
~~~sql
69
+
-- writes to the source table
69
70
INSERT INTO city (1, nyc); -- timestamp 1
70
71
UPDATE city SET name ='philly'WHERE id =1; -- timestamp 2
71
72
INSERT INTO city (100, nyc); -- timestamp 3
@@ -75,22 +76,25 @@ LDR replicates the write to the **destination cluster**:
75
76
76
77
{% include_cached copy-clipboard.html %}
77
78
~~~sql
79
+
-- replicates to the destination table
78
80
INSERT INTO city (100, nyc); -- timestamp 4
79
81
~~~
80
82
81
83
_Timestamp 5:_ Range containing primary key `1` on the destination cluster is unavailable for a few minutes due to a network partition.
82
84
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:
Copy file name to clipboardExpand all lines: src/current/v25.1/set-up-logical-data-replication.md
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ For more details, refer to the LDR [Known limitations]({% link {{ page.version.v
62
62
63
63
#### Unique secondary indexes
64
64
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.
66
66
67
67
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.
68
68
@@ -72,6 +72,7 @@ On the **source cluster**:
72
72
73
73
{% include_cached copy-clipboard.html %}
74
74
~~~sql
75
+
-- writes to the source table
75
76
INSERT INTO city (1, nyc); -- timestamp 1
76
77
UPDATE city SET name ='philly'WHERE id =1; -- timestamp 2
77
78
INSERT INTO city (100, nyc); -- timestamp 3
@@ -81,22 +82,25 @@ LDR replicates the write to the **destination cluster**:
81
82
82
83
{% include_cached copy-clipboard.html %}
83
84
~~~sql
85
+
-- replicates to the destination table
84
86
INSERT INTO city (100, nyc); -- timestamp 4
85
87
~~~
86
88
87
89
_Timestamp 5:_ Range containing primary key `1` on the destination cluster is unavailable for a few minutes due to a network partition.
88
90
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:
Copy file name to clipboardExpand all lines: src/current/v25.2/set-up-logical-data-replication.md
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ For more details, refer to the LDR [Known limitations]({% link {{ page.version.v
70
70
71
71
#### Unique secondary indexes
72
72
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.
74
74
75
75
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.
76
76
@@ -80,6 +80,7 @@ On the **source cluster**:
80
80
81
81
{% include_cached copy-clipboard.html %}
82
82
~~~sql
83
+
-- writes to the source table
83
84
INSERT INTO city (1, nyc); -- timestamp 1
84
85
UPDATE city SET name ='philly'WHERE id =1; -- timestamp 2
85
86
INSERT INTO city (100, nyc); -- timestamp 3
@@ -89,22 +90,25 @@ LDR replicates the write to the **destination cluster**:
89
90
90
91
{% include_cached copy-clipboard.html %}
91
92
~~~sql
93
+
-- replicates to the destination table
92
94
INSERT INTO city (100, nyc); -- timestamp 4
93
95
~~~
94
96
95
97
_Timestamp 5:_ Range containing primary key `1` on the destination cluster is unavailable for a few minutes due to a network partition.
96
98
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:
0 commit comments