[tor-bugs] #22141 [Metrics/metrics-lib]: Deprecate `DescriptorFile` and add relevant information to `Descriptor`

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jun 14 14:44:07 UTC 2017


#22141: Deprecate `DescriptorFile` and add relevant information to `Descriptor`
---------------------------------+-----------------------------------
 Reporter:  karsten              |          Owner:  karsten
     Type:  enhancement          |         Status:  needs_review
 Priority:  Medium               |      Milestone:  metrics-lib 1.9.0
Component:  Metrics/metrics-lib  |        Version:
 Severity:  Normal               |     Resolution:
 Keywords:                       |  Actual Points:
Parent ID:                       |         Points:
 Reviewer:                       |        Sponsor:
---------------------------------+-----------------------------------

Comment (by karsten):

 Replying to [comment:19 iwakeh]:
 > Replying to [comment:18 karsten]:
 > > [snip]
 > >
 > > The issue with `DescriptorCollector` returning `void` is that we
 cannot return any exceptions caught while fetching descriptor files from
 the remote CollecTor host to the caller.  This could be anything from
 fetching the `index.json` file or an actual descriptor file to differences
 between expected and actual file size or even indexing the local target
 directory.
 > >
 > > What we ''can'' do is log these exceptions/issues, so that the
 operator gets aware of them.  But we can't hand over exceptions to the
 application.  At least not easily (see `ExceptionListener`).
 >
 > Well, throwing an Exception is a way to communicate problems to the
 caller.  Anyway, there are not that many distinguishable error situations;
 e.g. w/o index.json there is no descriptor downloading -> Exception.

 A missing `index.json` might indeed qualify for throwing an `Exception`,
 because `DescriptorIndexCollector` cannot recover from that.  But there
 are other exception cases, like an issue with downloading a specific file,
 that `DescriptorIndexCollector` can work around by trying the next file.
 And if we want to provide best effort results, we'll have to recover from
 as many issues as possible.  In such a case, where would we throw an
 `Exception`?

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


More information about the tor-bugs mailing list