Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DD957200BEF for ; Wed, 4 Jan 2017 20:04:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DD46E160B44; Wed, 4 Jan 2017 19:04:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 31496160B3A for ; Wed, 4 Jan 2017 20:04:01 +0100 (CET) Received: (qmail 14451 invoked by uid 500); 4 Jan 2017 19:03:58 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 14058 invoked by uid 99); 4 Jan 2017 19:03:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2017 19:03:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6A8692C1F5A for ; Wed, 4 Jan 2017 19:03:58 +0000 (UTC) Date: Wed, 4 Jan 2017 19:03:58 +0000 (UTC) From: "Yongjun Zhang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (HDFS-11292) log lastWrittenTxId in logSyncAll MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 04 Jan 2017 19:04:02 -0000 [ https://issues.apache.org/jira/browse/HDFS-11292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yongjun Zhang reassigned HDFS-11292: ------------------------------------ Assignee: Yongjun Zhang > log lastWrittenTxId in logSyncAll > --------------------------------- > > Key: HDFS-11292 > URL: https://issues.apache.org/jira/browse/HDFS-11292 > Project: Hadoop HDFS > Issue Type: Improvement > Components: hdfs > Reporter: Yongjun Zhang > Assignee: Yongjun Zhang > > For the issue reported in HDFS-10943, even after HDFS-7964's fix is included, the problem still exists, this means there might be some synchronization issue. > To diagnose that, create this jira to report the lastWrittenTxId info in {{logSyncAll()}} call, such that we can compare against the error message reported in HDFS-7964 > Specifically, there is two possibility for the HDFS-10943 issue: > 1. {{logSyncAll()}} (statement A in the code quoted below) doesn't flush all requested txs for some reason > 2. {{logSyncAll()}} does flush all requested txs, but some new txs sneaked in between A and B. It's observed that the lastWrittenTxId in B and C are the same. > This proposed reporting would help confirming if 2 is true. > {code} > public synchronized void endCurrentLogSegment(boolean writeEndTxn) { > LOG.info("Ending log segment " + curSegmentTxId); > Preconditions.checkState(isSegmentOpen(), > "Bad state: %s", state); > if (writeEndTxn) { > logEdit(LogSegmentOp.getInstance(cache.get(), > FSEditLogOpCodes.OP_END_LOG_SEGMENT)); > } > // always sync to ensure all edits are flushed. > A. logSyncAll(); > B. printStatistics(true); > final long lastTxId = getLastWrittenTxId(); > try { > C. journalSet.finalizeLogSegment(curSegmentTxId, lastTxId); > editLogStream = null; > } catch (IOException e) { > //All journals have failed, it will be handled in logSync. > } > state = State.BETWEEN_LOG_SEGMENTS; > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org