Skip to content

Commit

Permalink
fix: possible race in reset subscription (#2301)
Browse files Browse the repository at this point in the history
only update cursor, leave state as-is

fixes #2261
  • Loading branch information
worstell authored Aug 12, 2024
1 parent a930215 commit bf981b0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions backend/controller/sql/queries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,7 @@ WITH event AS (
WHERE "key" = $2::topic_event_key
)
UPDATE topic_subscriptions
SET state = 'idle',
cursor = (SELECT id FROM event)
SET cursor = (SELECT id FROM event)
WHERE key = $1::subscription_key;

-- name: GetTopic :one
Expand Down
3 changes: 1 addition & 2 deletions backend/controller/sql/queries.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lsp/hoveritems.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bf981b0

Please sign in to comment.