-
Notifications
You must be signed in to change notification settings - Fork 285
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
panic: Unable to flush sub store: pq: duplicate key value violates unique constraint "pk_msgpendingkey" #741
Comments
You did not actually print the NATS Streaming version. Could you please let me know which one is it? |
Also, you would not point 2 (or more) NATS Streaming server to the same database by any chance? |
Any news on that? Closing for now, will re-open if you provide some updates. |
I also have the same problem.
nats-streaming-server version 0.11.2, nats-server version 1.3.0 I configure a fail-tolerance cluster (2 nats-streaming servers) that run from one database(postgres sql-store). |
@kozlovic, please re-open this issue |
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>
@LafonteFull @TipDev Sorry for the delay in getting back to you. I finally figure out what the problem was. I have pushed a PR if you want to try it out PR #828 |
@kozlovic Sorry for the delay. This is grate news! Thank you! |
Got this error yesterday and today, and it's fixed after deleting the table contents by myself.
Version :
version | 1.3.0
proto | 1
go | go1.11.4
Postgres : 10 on AWS RDS
The text was updated successfully, but these errors were encountered: