-
Notifications
You must be signed in to change notification settings - Fork 914
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
conn#readReadyForQuery(): on error (E) message throw that specific error #1136
base: master
Are you sure you want to change the base?
conn#readReadyForQuery(): on error (E) message throw that specific error #1136
Conversation
not a generic one, so that the application can decide how to handle it. Sure it is an "unexpected message", but not a protocol error: > A frontend must be prepared to accept ErrorResponse and NoticeResponse > messages whenever it is expecting any other type of message. -- https://www.postgresql.org/docs/current/protocol-flow.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for your contribution! is there a way you can test this change?
@log1-c You're affected by Icinga/icingadb#620. Please could you give this one a try? Don't hesitate to ask me if anything. |
I'd like to, but not sure how exactly. I clonedthe icingadb repo and edited all occurences of github.com/lib/pq to your fork and commit for i in $(grep -ri lib/pq pkg/ | cut -d ":" -f1 |sort -n | uniq);do sed -i 's/lib\/pg/Al2Klimov\/pq/g' $i;done Then I tried running
And # go mod tidy
go: downloading github.com/Al2Klimov/pq v0.0.0-20230810163137-b7fc3ebbfd5f
go: github.com/Al2Klimov/[email protected]: parsing go.mod:
module declares its path as: github.com/lib/pq
but was required as: github.com/Al2Klimov/pq
# grep -ri lib/pq * Plan was to create a new icingadb binary that I can replace the v1.1.1 version with. Can you point me in the right direction? |
At best:
|
Ok, now I get the following when trying to run go build # go build
no Go files in /home/username/icingadb Let me say that I have no experience with Go ;) Simplest thing (for me) would be if you can provide me the ready-to-use icingadb binary/executable which I can swap in for the existing v1.1.1. |
Sorry! My fault. You need go build ./cmd/icingadb |
Had some time to test today @Al2Klimov As this is our DEV env we will simply let the modified icingadb binary active. In case when see any behavioral changes, all update the issue. |
Thank you for testing. But 6c8b52f2033cd94466863c92d3df632e3c87743c is plain v1.1.1, so I think you should modify it on both nodes. Also, regarding crashes, this PR is only the first step. Its goal is to make the error thrown in Icinga/icingadb#620 more specific, so we know what to handle. |
This binary is modified on both nodes.
But the testing is not really conclusive as our config master currently fails with the error message mentioned in Icinga/icinga2#9942 |
You need either Icinga 2.14.1 (TBD): or this workaround: Icinga/icinga2#9942 Or, if the above workaround is too much manual work, you could also FLUSHDB, or better: DEL icinga:history:stream:downtime, the Redis in question. After all, IIRC, both Icinga DBs write the history. |
Look, @rafiss, @log1-c has successfully tested this PR: Icinga/icingadb#620 (comment) 🎉 |
not a generic one, so that the application can decide how to handle it. Sure it is an "unexpected message", but not a protocol error:
-- https://www.postgresql.org/docs/current/protocol-flow.html
fixes Icinga/icingadb#478