pravega / pravega-client-rust

Rust based Pravega client.
Apache License 2.0
31 stars 25 forks source link

ByteStreamReader::read returns a segment sealed error even when there are bytes available #163

Closed claudiofahey closed 4 years ago

claudiofahey commented 4 years ago

Problem description If I have a 100 byte segment that is sealed, seek to offset 90, and I try to read into a 20 byte buffer, it will fail with a segment sealed error. I expect it to partially fill the buffer and return a Ok(10). This creates a problem when trying to use a BufReader since it will always attempt to read into a large buffer.

Problem location Possibly byte_stream.rs or perhaps this is a limitation of the Segment Store.

Suggestions for an improvement Unknown.

Tristan1900 commented 4 years ago

yes I have also observed this problem, basically when reader issues a read request that has offset + length that's beyond the sealed semgnet last offset, a segmentIsSealed will be returned instead of the remaining bytes. I think we should file an issue in Pravega repo.

update: filed issue https://github.com/pravega/pravega/issues/5247