[tor-bugs] #25821 [Core Tor/Stem]: Stem getconf cache doesn't clear for CONF_CHANGED events; probably should set value

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon May 14 02:47:11 UTC 2018


#25821: Stem getconf cache doesn't clear for CONF_CHANGED events; probably should
set value
---------------------------+--------------------------
 Reporter:  dmr            |          Owner:  atagar
     Type:  defect         |         Status:  reopened
 Priority:  Medium         |      Milestone:
Component:  Core Tor/Stem  |        Version:
 Severity:  Normal         |     Resolution:
 Keywords:                 |  Actual Points:
Parent ID:                 |         Points:
 Reviewer:                 |        Sponsor:
---------------------------+--------------------------
Changes (by dmr):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Replying to [comment:4 atagar]:
 > If this is still an issue then feel free to reopen.

 Re-opening.
 atagar and I discussed this over IRC.

 Some points from the discussion below...

 Replying to [comment:2 dmr]:
 > So I propose that stem changes its cache behavior to //set// the
 `'getconf'` cache //only// within `_confchanged_listener()`, to the
 value(s) provided by the event.
 > It seems superfluous to do it within `set_options()` if it's going to be
 set soon after.
 * `_confchanged_listener()` will set the cache to value(s) provided in the
 event
 * caching will be removed from `set_options()`

 > However, one advantage I could see to setting the cache in
 `set_options()` is so that code like this would work intuitively without
 issuing a GETCONF again:
 > {{{
 > ...
 > }}}
 * `GETCONF` is cheap/fast; we don't need to worry about that

 > But code like this //currently doesn't// work intuitively because
 `load_conf()` doesn't have the configuration values
 [[https://gitweb.torproject.org/torspec.git/tree/control-
 spec.txt?id=d4a64fbf5aaba383638d9f3c70bd2951f8c5ad89#n1365|specified in
 its response]]:
 > {{{
 > ...
 > }}}
 > (that could be improved if `load_conf()` clears the `'getconf'` cache.)
 * to be filed as separate issue
 * `load_conf()` should clear the entire cache (not just 'getconf' cache)

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


More information about the tor-bugs mailing list