[ 
https://issues.apache.org/jira/browse/HDFS-4750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14710603#comment-14710603
 ] 

Yongjun Zhang commented on HDFS-4750:
-------------------------------------

Hi [~brandonli],

Thanks for your earlier work here. 

Need some help. I'm seeing a problem which might be a bug, would like to check 
with you. The symptom is that the following Warning is issue in the case I'm 
looking at. The following code commented that it should not happen for 
overlapped concurent writers.
{code}
    } else if (range.getMin() < offset && range.getMax() > offset) {
        // shouldn't happen since we do sync for overlapped concurrent writers
        LOG.warn("Got an overlapping write (" + range.getMin() + ", "
            + range.getMax() + "), nextOffset=" + offset
            + ". Silently drop it now");
        pendingWrites.remove(range);
        processCommits(nextOffset.get()); // handle race
      } else {
{code}
However, I saw {{receivedNewWrite}} calls the following method to check if a 
write is repeated write, but not checking overlapping write:
{code}
  private WriteCtx checkRepeatedWriteRequest(WRITE3Request request,
      Channel channel, int xid) {
    OffsetRange range = new OffsetRange(request.getOffset(),
        request.getOffset() + request.getCount());
    WriteCtx writeCtx = pendingWrites.get(range);
    if (writeCtx== null) {
      return null;
    } else {
      if (xid != writeCtx.getXid()) {
        LOG.warn("Got a repeated request, same range, with a different xid: "
            + xid + " xid in old request: " + writeCtx.getXid());
        //TODO: better handling.
      }
      return writeCtx;  
    }
  }
{code}
thus overlapping write can get into {{pendingWrites}}, which seems to be why 
I'm seeing the Warn described in the beginning of this comment.

Would you please comment on why we only check on repeatedwrites, but not 
overlappingWrites in {{receivedNewWrite}}? Is it by design that 
{{receivedNewWrite}} should not have overlapped requests?

Thanks a lot.



 

> Support NFSv3 interface to HDFS
> -------------------------------
>
>                 Key: HDFS-4750
>                 URL: https://issues.apache.org/jira/browse/HDFS-4750
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: nfs
>    Affects Versions: 3.0.0
>            Reporter: Brandon Li
>            Assignee: Brandon Li
>         Attachments: HADOOP-NFS-Proposal.pdf, HDFS-4750.patch, nfs-trunk.patch
>
>
> Access HDFS is usually done through HDFS Client or webHDFS. Lack of seamless 
> integration with client’s file system makes it difficult for users and 
> impossible for some applications to access HDFS. NFS interface support is one 
> way for HDFS to have such easy integration.
> This JIRA is to track the NFS protocol support for accessing HDFS. With HDFS 
> client, webHDFS and the NFS interface, HDFS will be easier to access and be 
> able support more applications and use cases. 
> We will upload the design document and the initial implementation. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to