nwangtw 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_r268283679
##########
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:
The original logic seems to return a 0 and then return -1 in the next run if
it is EOS. It seems to be safer to me (if currently there is no data but it is
not EOS yet). Is there any issue?
----------------------------------------------------------------
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