ivankelly opened a new pull request #1741: BlockAwareSegmentInputStream should only return unsigned bytes URL: https://github.com/apache/incubator-pulsar/pull/1741 The contract for InputStream expects that read() returns a positive int, except in the case of EOF, when it returns -1. In BlockAwareSegmentInputStream, we were returning the padding as a signed byte, and reading from the ledger as a signed byte. This meant that for padding, we were returning negative integers, and possibly returning negative integers, even -1 depending on the data, when reading from the ledger. This change ensures that BlockAwareSegmentInputStream always returns positive int except in the case of EOF. Master Issue: #1511
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services