Skip to content
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

[FIXED] SQLStore: panic when updating subscriptions pending state #828

Merged
merged 1 commit into from
May 10, 2019

Conversation

kozlovic
Copy link
Member

@kozlovic kozlovic commented May 9, 2019

Issue was due to the fact that we were not keeping track of the
maximum row number, so if a subscription that are pending state
saved in row 1 and 3 and the last recovered subscription had
state in row 2, and then the next update was for the first subscription
the SQL statement would have tried to add a row with ID 3 which
already existed.

Resolves #741

Signed-off-by: Ivan Kozlovic ivan@synadia.com

Issue was due to the fact that we were not keeping track of the
maximum row number, so if a subscription that are pending state
saved in row 1 and 3 and the last recovered subscription had
state in row 2, and then the next update was for the first subscription
the SQL statement would have tried to add a row with ID 3 which
already existed.

Resolves #741

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 91.861% when pulling 312742a on fix_sql_substore_crash into 759e109 on master.

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

@kozlovic kozlovic merged commit 58bcce5 into master May 10, 2019
@kozlovic kozlovic deleted the fix_sql_substore_crash branch May 10, 2019 00:41
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.

panic: Unable to flush sub store: pq: duplicate key value violates unique constraint "pk_msgpendingkey"
3 participants