Opened 3 years ago

Last modified 3 years ago

#24166 new enhancement

Make descriptor reading stoppable

Reported by: iwakeh Owned by: metrics-team
Priority: Medium Milestone:
Component: Metrics/Library Version:
Severity: Normal Keywords: metrics-2018
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


What would be the best way to not force reading of all descriptors?
See #20412 comment:9 for background.

Suggestion so far: create an abortReading method and after this method was called the reader's status is similar to a completed reading of descriptors, e.g., methods concerning stats don't throw ISEs anymore.

Child Tickets

Change History (3)

comment:1 Changed 3 years ago 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.

comment:2 Changed 3 years ago by karsten

Summary: Make descriptor reading stopableMake descriptor reading stoppable

Fix typo.

comment:3 Changed 3 years ago by iwakeh

This relates closely to #20395 comment 17.

Note: See TracTickets for help on using tickets.