-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: savepoints are broken with slow statements on master #94337
Copy link
Copy link
Closed
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-kvKV TeamKV Teambranch-release-23.1Used to mark GA and release blockers, technical advisories, and bugs for 23.1Used to mark GA and release blockers, technical advisories, and bugs for 23.1release-blockerIndicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.
Description
While investigating #93379, @rafiss and I have discovered some very broken behavior with savepoints on master.
The following logic test fails, but it should succeed (seeing nothing in the final output statement):
statement ok
CREATE TABLE a (id INT);
CREATE TABLE b (id INT8)
statement ok
BEGIN
statement ok
SELECT pg_sleep(1.5)
statement ok
SAVEPOINT s
statement ok
SELECT pg_sleep(1.5)
statement ok
INSERT INTO a(id) VALUES (0);
INSERT INTO b(id) VALUES (0)
statement ok
ROLLBACK TO SAVEPOINT s
query I
SELECT * FROM a
----
The pg_sleep statements are important to make this fail, suggesting timing issues.
Jira issue: CRDB-22839
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-kvKV TeamKV Teambranch-release-23.1Used to mark GA and release blockers, technical advisories, and bugs for 23.1Used to mark GA and release blockers, technical advisories, and bugs for 23.1release-blockerIndicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.