Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 241C717554 for ; Sat, 26 Sep 2015 05:02:05 +0000 (UTC) Received: (qmail 7700 invoked by uid 500); 26 Sep 2015 05:02:04 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 7639 invoked by uid 500); 26 Sep 2015 05:02:04 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 7624 invoked by uid 99); 26 Sep 2015 05:02:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Sep 2015 05:02:04 +0000 Date: Sat, 26 Sep 2015 05:02:04 +0000 (UTC) From: "Brandon Li (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-9092) Nfs silently drops overlapping write requests, thus data copying can't complete MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-9092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14909087#comment-14909087 ] Brandon Li commented on HDFS-9092: ---------------------------------- +1. Patch looks good to me. Thank you [~yzhangal] > Nfs silently drops overlapping write requests, thus data copying can't complete > ------------------------------------------------------------------------------- > > Key: HDFS-9092 > URL: https://issues.apache.org/jira/browse/HDFS-9092 > Project: Hadoop HDFS > Issue Type: Bug > Components: nfs > Affects Versions: 2.7.1 > Reporter: Yongjun Zhang > Assignee: Yongjun Zhang > Attachments: HDFS-9092.001.patch > > > When NOT using 'sync' option, the NFS writes may issue the following warning: > org.apache.hadoop.hdfs.nfs.nfs3.OpenFileCtx: Got an overlapping write (1248751616, 1249677312), nextOffset=1248752400. Silently drop it now > and the size of data copied via NFS will stay at 1248752400. > Found what happened is: > 1. The write requests from client are sent asynchronously. > 2. The NFS gateway has handler to handle the incoming requests by creating an internal write request structuire and put it into cache; > 3. In parallel, a separate thread in NFS gateway takes requests out from the cache and writes the data to HDFS. > The current offset is how much data has been written by the write thread in 3. The detection of overlapping write request happens in 2, but it only checks the write request against the curent offset, and trim the request if necessary. Because the write requests are sent asynchronously, if two requests are beyond the current offset, and they overlap, it's not detected and both are put into the cache. This cause the symptom reported in this case at step 3. -- This message was sent by Atlassian JIRA (v6.3.4#6332)