-
Notifications
You must be signed in to change notification settings - Fork 670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When replication factor > 1, all modifications are done via 2PC #5379
Conversation
0bd8b34
to
611d7cb
Compare
@@ -51,6 +64,13 @@ SELECT * FROM the_table; | |||
1 | 2 | 2 | |||
(1 row) | |||
|
|||
INSERT INTO the_replicated_table (a, b, z) VALUES (1, 2, 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This* is a side-effect that I didn't consider until I hit the error.
replication > 1
ANDcitus.writable_standby_coordinator TO ON
now fails as we need to write 2PC record.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that never really worked properly, since we also would not be able to write a shardstate record. A slightly better error message would be nice though.
611d7cb
to
4a72228
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine, would be nice to fix the "cannot assign TransactionIds during recovery" error message.
4a72228
to
39e0453
Compare
Codecov Report
@@ Coverage Diff @@
## master #5379 +/- ##
==========================================
- Coverage 94.21% 94.18% -0.03%
==========================================
Files 215 215
Lines 42818 42814 -4
==========================================
- Hits 40339 40324 -15
- Misses 2479 2490 +11 |
14e18af
to
fa48ada
Compare
With Citus 9.0, we introduced `citus.single_shard_commit_protocol` which defaults to 2PC. With this commit, we prevent any user to set it to 1PC and drop support for `citus.single_shard_commit_protocol`. Although this might add some overhead for users, it is already the default behaviour (so less likely) and marking placements as INVALID is much worse.
fa48ada
to
64980c1
Compare
Prior to this commit, the code would skip processing the errors happened for local commands. Prior to #5379, it might make sense to allow the execution continue. But, as of today, if a modification fails on any placement, we can safely fail the execution.
Prior to this commit, the code would skip processing the errors happened for local commands. Prior to #5379, it might make sense to allow the execution continue. But, as of today, if a modification fails on any placement, we can safely fail the execution.
Prior to this commit, the code would skip processing the errors happened for local commands. Prior to #5379, it might make sense to allow the execution continue. But, as of today, if a modification fails on any placement, we can safely fail the execution.
Prior to this commit, the code would skip processing the errors happened for local commands. Prior to #5379, it might make sense to allow the execution continue. But, as of today, if a modification fails on any placement, we can safely fail the execution.
Prior to this commit, the code would skip processing the errors happened for local commands. Prior to #5379, it might make sense to allow the execution continue. But, as of today, if a modification fails on any placement, we can safely fail the execution. The first commit show the problem in action. The second commit includes the fix and the test fixes.
With Citus 9.0, we introduced
citus.single_shard_commit_protocol
whichdefaults to 2PC.
With this commit, we prevent any user to set it to 1PC and drop support
for
citus.single_shard_commit_protocol
.Although this might add some overhead for users, it is already the default
behaviour (so less likely) and marking placements as INVALID is much
worse.
DESCRIPTION: Drops GUC citus.single_shard_commit_protocol, defaults to 2PC