[tor-bugs] #19755 [Metrics/CollecTor]: improve code quality of bridgedescs module

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Aug 4 12:36:42 UTC 2016


#19755: improve code quality of bridgedescs module
-------------------------------+---------------------------------
 Reporter:  iwakeh             |          Owner:  iwakeh
     Type:  enhancement        |         Status:  needs_review
 Priority:  Medium             |      Milestone:  CollecTor 1.1.0
Component:  Metrics/CollecTor  |        Version:
 Severity:  Normal             |     Resolution:
 Keywords:                     |  Actual Points:
Parent ID:                     |         Points:
 Reviewer:                     |        Sponsor:
-------------------------------+---------------------------------

Comment (by iwakeh):

 Replying to [comment:14 karsten]:
 > Replying to [comment:13 iwakeh]:
 > > I looked closer at the "recent" path commit, b/c I also provide a
 [https://gitweb.torproject.org/user/iwakeh/collector.git/commit/?h=task-19720
 -reread-configuration&id=57d1d184c7f44f1cf01e892bb1e070cdd92f7ea9 commit]
 for that in the branch for #19720.
 > > We arrived at different solutions:
 > > You only log the ConfigurationException and I let it escalate.
 > > My reasoning is that, if a Path cannot be constructed it means there
 is an invalid entry in collector.properties.  Thus, the module run should
 fail (this will be logged).
 >
 > Ah, makes sense, happy to use your patch and discard mine.

 Fine.

 >
 > > Maybe, a third solution that sets a recent path as attribute will be
 better?
 >
 > What would be the goal there?  I agree that the module shouldn't run if
 the configuration is invalid.

 I noticed that `config.getPath(Key.RecentPath)` is called four times in
 `SanitizedBridgesWriter`, but actually that call isn't overly expensive.
 So no need to change more.  Using my #19720 commit is ok.

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


More information about the tor-bugs mailing list