[
https://issues.apache.org/jira/browse/KUDU-1389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15247446#comment-15247446
]
Mike Percy commented on KUDU-1389:
----------------------------------
It looks like ReadFully() doesn't deal with EINTR. Our posix Read()
abstractions allow "short reads" and therefore don't attempt to retry and
fulfill a user's request for a particular length. If they hit a return value of
-1 then they simply return an IOError.
I've got a patch up to address the issue for RWFile @
http://gerrit.cloudera.org/#/c/2814/1/src/kudu/util/env_posix.cc, since the
RWFile API provides a "no short reads" contract, but the rest need more
thought. For example, should we provide a no-short-reads contract for
RandomAccessFile and SequentialFile in the same way we do it for RWFile?
Alternatively, we could add additional methods that have that contract, i.e.
ReadFully() methods on those classes.
> Handle EINTR for syscalls
> -------------------------
>
> Key: KUDU-1389
> URL: https://issues.apache.org/jira/browse/KUDU-1389
> Project: Kudu
> Issue Type: Bug
> Components: util
> Reporter: Mike Percy
>
> We should handle EINTR with automatic retries for syscalls that can be
> interrupted to avoid unnecessary crashes in cases where system calls can be
> interrupted and where we CHECK on failure (many places where we perform disk
> IO). We should be able to encapsulate much of this logic in env_posix.cc
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)