#32554 closed enhancement (fixed)

Stop checking and reloading configuration file

Reported by: karsten Owned by: karsten
Priority: Medium Milestone:
Component: Metrics/CollecTor Version:
Severity: Normal Keywords:
Cc: metrics-team Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


A while ago we started observing the configuration file for changes, and whenever it changed, we would use the new configuration for the next module run. The idea was that some module runs could take so much time that it's painful to wait for all modules to finish before changing the configuration.

I can see several reasons for removing this feature:

  • This behavior can be a bit surprising to operators who are more used to services that require a reload or restart in order to read new configuration values. So, even if we allowed for reconfiguration at runtime, we should at least have some sort of reload function, even though I don't really know an easy way for implementing. But I think in 99% of cases we'd be fine restarting the service and not just reloading the configuration.
  • Having this feature around makes it more difficult to switch to a configuration library like Apache Commons Configuration which (AFAIK) doesn't have such a feature.
  • The code around this will soon become problematic with Observable being deprecated in Java 9.

I suggest we remove this feature and only load the configuration file once at startup. I'm going to attach a patch in a moment.

Child Tickets

Change History (3)

comment:2 Changed 12 months ago by irl

Status: needs_reviewmerge_ready

reasoning is sound and commit lgtm

comment:3 Changed 12 months ago by karsten

Resolution: fixed
Status: merge_readyclosed

Thanks for looking! Merged! Closing.

Note: See TracTickets for help on using tickets.