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

auth: Reconnect to the server if the My/Pg connection has been closed #5245

Merged
merged 6 commits into from Jul 6, 2017

Conversation

Projects
None yet
4 participants
@rgacogne
Member

rgacogne commented Apr 15, 2017

Short description

Test if the connection has been closed before trying to use it, and reconnect if it has.
Barely tested, comments welcome!

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
@zeha

This comment has been minimized.

Show comment
Hide comment
@zeha

zeha Apr 15, 2017

Collaborator

whats the expected interaction of reconnectIfNeeded and startTransaction?

Collaborator

zeha commented Apr 15, 2017

whats the expected interaction of reconnectIfNeeded and startTransaction?

@rgacogne rgacogne changed the title from [WIP] auth: Reconnect to the server if the My/Pg connection has been closed to auth: Reconnect to the server if the My/Pg connection has been closed May 14, 2017

@zeha

This comment has been minimized.

Show comment
Hide comment
@zeha

zeha Jun 1, 2017

Collaborator

👍

Collaborator

zeha commented Jun 1, 2017

👍

@pieterlexis

This comment has been minimized.

Show comment
Hide comment
@pieterlexis

pieterlexis Jun 1, 2017

Member

Does this deprecate the work in #5005?

Member

pieterlexis commented Jun 1, 2017

Does this deprecate the work in #5005?

@Habbie

This comment has been minimized.

Show comment
Hide comment
@Habbie

Habbie Jun 1, 2017

Member

Does this deprecate the work in #5005?

yes

Member

Habbie commented Jun 1, 2017

Does this deprecate the work in #5005?

yes

@Habbie Habbie added this to the auth-4.1.0 milestone Jun 13, 2017

rgacogne added some commits Apr 15, 2017

auth: Check the connection status in addition to PQstatus()
`PQstatus()` only checks the known state of the connection. It's
useful because if the connection is already known to be bad we don't
need to go further, but it isn't sufficient to detect whether it has
been closed since the last time we used it.
@Habbie

This comment has been minimized.

Show comment
Hide comment
@Habbie

Habbie Jun 15, 2017

Member

Testing packages (based on the master branch + this PR) are now available at https://downloads.powerdns.com/autobuilt/. Browse to your flavour, then find the files with 'authsqlconnectionreset' in their name.

Member

Habbie commented Jun 15, 2017

Testing packages (based on the master branch + this PR) are now available at https://downloads.powerdns.com/autobuilt/. Browse to your flavour, then find the files with 'authsqlconnectionreset' in their name.

@Habbie

This comment has been minimized.

Show comment
Hide comment
@Habbie

Habbie Jul 6, 2017

Member

We had one positive testing report. Merging this in the expectation that we'll alpha or RC auth-4.1.0 before we release it.

Member

Habbie commented Jul 6, 2017

We had one positive testing report. Merging this in the expectation that we'll alpha or RC auth-4.1.0 before we release it.

@Habbie Habbie merged commit 6cdd67c into PowerDNS:master Jul 6, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rgacogne rgacogne deleted the rgacogne:auth-sql-connection-reset branch Jul 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment