[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #19842 [Metrics/metrics-lib]: offer a `LenientParser` option with metrics-lib
#19842: offer a `LenientParser` option with metrics-lib
---------------------------------+-----------------------------------
Reporter: iwakeh | Owner: karsten
Type: enhancement | Status: needs_information
Priority: Medium | Milestone:
Component: Metrics/metrics-lib | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
---------------------------------+-----------------------------------
Changes (by karsten):
* status: new => needs_information
Comment:
Hmm, I don't know how to proceed with this issue. A few thoughts:
- We should only use new properties for new implementations of a parser
or reader, not for a config option. If we want a config option, let's add
a method to the descriptor source.
- `DescriptorReaderImpl` internally uses a `DescriptorParser` for parsing
descriptor. If we just want to switch to another parser, let's create a
method `DescriptorReader#setDescriptorParser()`. Or let's use
`DescriptorSourceFactory` internally to create a parser instance rather
than instantiating `DescriptorParserImpl` directly.
- The case of non-ASCII characters in statistics lines seems rather
special, and doesn't seem worth adding an option that 99.9% of users won't
care about. We could generalize and provide an option to not fail
descriptor parsing if a single line cannot be parsed, or something like
that.
- If non-ASCII characters in statistics line are spec-conformant, let's
fix metrics-lib by default. I don't recall whether that's the case. But
if it's a spec violation, let's treat this case as any other spec
violation.
- How much do we still care about this issue? Is there a current use
case that would justify putting in the effort? If yes, okay. But if not,
let's just close this ticket.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19842#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs