[tor-bugs] #24166 [Metrics/Library]: Make descriptor reading stopable

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Nov 8 11:06:54 UTC 2017


#24166: Make descriptor reading stopable
-----------------------------+------------------------------
 Reporter:  iwakeh           |          Owner:  metrics-team
     Type:  enhancement      |         Status:  new
 Priority:  Medium           |      Milestone:
Component:  Metrics/Library  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:  metrics-2018     |  Actual Points:
Parent ID:                   |         Points:
 Reviewer:                   |        Sponsor:
-----------------------------+------------------------------

Comment (by karsten):

 Another option would be to change `saveHistoryFile(File)`,
 `getExcludedFiles()`, and `getParsedFiles()` to not depend anymore on
 whether reading has finished. This is not exactly trivial to implement,
 because we'd have to check which descriptors the application has already
 read from the returned `Iterator<Descriptor>` in order for these
 operations to still return deterministic results. Note that we'd likely
 have to think about similar aspects even when implementing the
 `abortReading` method.

 Another idea: we'd currently not be using these new methods, and maybe
 we'll never use them. Maybe we can get away by just documenting the
 `IllegalStateException` better, so that others know that, if they decide
 not to finish reading, they should just leave the descriptor reader alone
 and not call these three methods.

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


More information about the tor-bugs mailing list