simingweng commented on a change in pull request #3223: fix saving and
restoring checkpoint from dlog
URL: https://github.com/apache/incubator-heron/pull/3223#discussion_r268344093
##########
File path: heron/io/dlog/src/java/org/apache/heron/dlog/DLInputStream.java
##########
@@ -120,7 +99,7 @@ public int read(byte[] b, int off, int len) throws
IOException {
if (currentLogRecord == null) {
currentLogRecord = nextLogRecord();
if (currentLogRecord == null) {
- return read;
+ return -1;
Review comment:
Yes, the protocol buffer message parser insists on not seeing any 0 return
value, therefore the first 0 already results in an error. We have to return -1
immediately when the end is reached. I tested this on my Heron+Bookkeeper on
k8s cluster with a stateful topology.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services