[metrics-bugs] #32554 [Metrics/CollecTor]: Stop checking and reloading configuration file

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Nov 20 12:02:58 UTC 2019


#32554: Stop checking and reloading configuration file
-----------------------------------+----------------------
     Reporter:  karsten            |      Owner:  karsten
         Type:  enhancement        |     Status:  assigned
     Priority:  Medium             |  Milestone:
    Component:  Metrics/CollecTor  |    Version:
     Severity:  Normal             |   Keywords:
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.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32554>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the metrics-bugs mailing list