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

Understand when a configuration reload is not fully succesfull #339

Closed
fluca1978 opened this issue Dec 15, 2022 · 0 comments
Closed

Understand when a configuration reload is not fully succesfull #339

fluca1978 opened this issue Dec 15, 2022 · 0 comments
Labels
feature New feature

Comments

@fluca1978
Copy link
Collaborator

The function transfer_configuration returns always success even when there are parameters that need a restart. As an example: https://github.com/agroal/pgagroal/blob/master/src/libpgagroal/configuration.c#L2481.

This means that whenever the function is called, there is no hint to the caller that the application of the configuration has failed. I propose to return the value of not-applied parameters instead, so that:

  • 0 means everything is applied
  • -n means n settings are not applied but the configuration has been reloaded
  • +x means reload errors

This can be useful also in the work I'm trying in #333 because I'm using the same function transfer_configuration to issue a parameter change on the fly.

@fluca1978 fluca1978 added the feature New feature label Dec 15, 2022
fluca1978 added a commit to fluca1978/pgagroal that referenced this issue Dec 15, 2022
…n reload.

The internal function `transfer_configuration` now returns a negative
value in the case of unchanged settings: such value counts the number
of parameters that has remained untouched, for example because they
require a restart.
The idea is that there are parameter that cannot be changed on the fly
and that do not prevent the configuration to be swapped, but it could
be interesting to take the count of unchanged configuration settings.

Close agroal#339
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant