-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[YSQL] Serializable isolation SELECT, DELETE, SELECT excessive failures #2698
Comments
Note that I have edited both this comment and the above comment to clean things up from a previous version of this issue that is no longer relevant. |
We are facing this issue with pretty basic use cases with YSQL and it's becoming a blocker. Do you need help in reproducing the issue? |
Hi, @lhotari. Feel free to detail your use cases and issues. If the issues do not fall into any of the cases above, a repro would be particularly nice. Note that this is not necessarily a bug because Yugabyte serializable isolation isn't the same as vanilla PostgreSQL serializable isolation. In Yugabyte, a serializable isolation transaction ensures that all of its statements could have appeared to happen on commit time. In that case, a lot of the failures become reasonable. However, the failure on the second variant of <stmt> (i.e. |
Bringing this to @spolitov 's attention for the issue where unrelated delete causes a conflict failure. |
Fixed by 385d2c5 |
Compared to vanilla PostgreSQL, Yugabyte seems to fail too often whenever a serializable isolation level transaction happens with an intermediate
DELETE
. Nothing is particularly wrong with the excessive failures. The most notable failure is on the second variant of <stmt> below, where disjointSELECT
s andDELETE
s still cause failures.CREATE TABLE t (i int)
INSERT INTO t VALUES (1), (2), (3)
BEGIN ISOLATION LEVEL SERIALIZABLE
DELETE FROM t WHERE i = 2
COMMIT
SELECT * FROM t
SELECT i FROM t WHERE i = 1
SELECT i FROM t WHERE i = 2
SELECT i FROM t WHERE i > 1
SELECT i FROM t
The "fail" above are all of the same kind. They non-deterministically fail on one of two statements:
The
DELETE
:The second <stmt>:
Related:
The text was updated successfully, but these errors were encountered: