Skip to content

sqlite: don't interrupt a running query if closed#128

Merged
knyar merged 1 commit intomainfrom
knyar/interrupt
Feb 5, 2026
Merged

sqlite: don't interrupt a running query if closed#128
knyar merged 1 commit intomainfrom
knyar/interrupt

Conversation

@knyar
Copy link
Contributor

@knyar knyar commented Feb 5, 2026

Updates tailscale/corp#36170

Updates tailscale/corp#36170

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
@bradfitz
Copy link
Member

bradfitz commented Feb 5, 2026

This could use more context, as this commit message doesn't say the motivation and the linked issue says nothing.

From Slack:

Screenshot 2026-02-05 at 7 34 56 AM

Comment on lines +582 to +586
if s.closed.Load() {
UsesAfterClose.Add("stmt.ExecContext.Interrupt", 1)
} else {
db.Interrupt()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's still a potential race here. we need to hold a mutex during Interrupt + Close.

Copy link
Member

@bradfitz bradfitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is better, but not yet complete.

@knyar knyar merged commit 7ccbf50 into main Feb 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants