Skip to content

Unable to distinguish valid stream end from broken stream #80

@wstrzalka

Description

@wstrzalka

Hi

I had recently run into an issue while importing large pbf file.
The problem was broken input stream and I ended up importing only half of the expected data that got unnoticed.
It's impossible to find out whether the import completed successfully and the EOFException is legit (basically that will be the case only while reading headersize in FileBlockHead.readHead) or whether the stream is broken in the middle of processing and it can not read the data to be expected down the line (any other place).

Either exception shall be thrown in such a case or another callback method in Sink introduced so Sink::complete() is called upon success and Sink:failure() upon error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions