-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: kv txn held open while sql txn waits for ROLLBACK #60915
Copy link
Copy link
Open
Labels
A-sql-executionRelating to SQL execution.Relating to SQL execution.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries TeamSQL Queries Team
Description
Is your feature request related to a problem? Please describe.
While a SQL transaction is in aborted state (i.e. refusing commands, but waiting for explicit ROLLBACK), the corresponding KV transaction is still alive and may hold intents open.
Describe the solution you'd like
Ideally the KV txn would be torn down the moment it is no longer used.
Describe alternatives you've considered
Don't do anything
Additional context
Repro:
-- session 1
create table foo(v int)
begin;
insert into foo values(1)
asdasfasfasfasf
select 1 -- current txn is aborted, commands ignored until end of txn block
-- session 2
begin;
select * from foo -- blocks foreverJira issue: CRDB-3103
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-executionRelating to SQL execution.Relating to SQL execution.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries TeamSQL Queries Team
Type
Projects
Status
Backlog