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

Don't throw away valid configuration updates #5952

Merged
merged 3 commits into from
Feb 10, 2020

Commits on Feb 10, 2020

  1. Don't throw away valid configuration updates

    The configuration reloading code takes various actions in order to limit
    the number of reloads that have to be performed. One of those actions is
    to check if the new configuration is the same as the current
    configuration. If the new configuration is the same, then there is no
    need to apply it and it can be safely ignored.
    
    However, the check was performed at the wrong location. The location
    assumed that the c.currentConfigurations variable is up to date. This
    assumption does not hold given the throttling and asynchronous handling
    of configuration updates. The effect of this incorrect assumption is
    that a configuration update can be thrown away and leave a prior
    configuration in place.
    
    This resolves the problem by moving the check to the loadMessage method.
    This is the point where the c.currentConfigurations variable is modified
    and so there is no chance that the new configuration will be compared
    against an incorrect version.
    Andrew Parker authored and traefiker committed Feb 10, 2020
    Configuration menu
    Copy the full SHA
    fab6027 View commit details
    Browse the repository at this point in the history
  2. Properly format

    Didn't run go fmt on the previous commit. This was pointed out by a
    failing test.
    Andrew Parker authored and traefiker committed Feb 10, 2020
    Configuration menu
    Copy the full SHA
    e4aaa84 View commit details
    Browse the repository at this point in the history
  3. Move equality test in the throttle

    juliens authored and traefiker committed Feb 10, 2020
    Configuration menu
    Copy the full SHA
    c39614d View commit details
    Browse the repository at this point in the history