From common-issues-return-208742-apmail-hadoop-common-issues-archive=hadoop.apache.org@hadoop.apache.org Fri Oct 16 12:39:05 2020 Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@locus.apache.org Delivered-To: apmail-hadoop-common-issues-archive@locus.apache.org Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by minotaur.apache.org (Postfix) with ESMTP id DA8C01A9DA for ; Fri, 16 Oct 2020 12:39:04 +0000 (UTC) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id 900A16575C for ; Fri, 16 Oct 2020 12:39:03 +0000 (UTC) Received: (qmail 2338 invoked by uid 500); 16 Oct 2020 12:39:02 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 2271 invoked by uid 500); 16 Oct 2020 12:39:01 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 2200 invoked by uid 99); 16 Oct 2020 12:39:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Oct 2020 12:39:01 +0000 Received: from jira2-he-de.apache.org (static.54.33.119.168.clients.your-server.de [168.119.33.54]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 0247141298 for ; Fri, 16 Oct 2020 12:39:00 +0000 (UTC) Received: from jira2-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira2-he-de.apache.org (ASF Mail Server at jira2-he-de.apache.org) with ESMTP id 265A8C80440 for ; Fri, 16 Oct 2020 12:39:00 +0000 (UTC) Date: Fri, 16 Oct 2020 12:39:00 +0000 (UTC) From: "ASF GitHub Bot (Jira)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Work logged] (HADOOP-17308) WASB : PageBlobOutputStream succeeding flush even when underlying flush to storage failed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-17308?focusedWorklogId= =3D501543&page=3Dcom.atlassian.jira.plugin.system.issuetabpanels:worklog-ta= bpanel#worklog-501543 ] ASF GitHub Bot logged work on HADOOP-17308: ------------------------------------------- Author: ASF GitHub Bot Created on: 16/Oct/20 12:38 Start Date: 16/Oct/20 12:38 Worklog Time Spent: 10m=20 Work Description: anoopsjohn opened a new pull request #2392: URL: https://github.com/apache/hadoop/pull/2392 =E2=80=A6underlying flush to storage failed =20 ## NOTICE =20 Please create an issue in ASF JIRA before opening a pull request, and you need to set the title of the pull request which starts with the corresponding JIRA issue number. (e.g. HADOOP-XXXXX. Fix a typo in Y= YY.) For more details, please see https://cwiki.apache.org/confluence/display= /HADOOP/How+To+Contribute =20 ---------------------------------------------------------------- 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: users@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 501543) Remaining Estimate: 0h Time Spent: 10m > WASB : PageBlobOutputStream succeeding flush even when underlying flush t= o storage failed=20 > -------------------------------------------------------------------------= ----------------- > > Key: HADOOP-17308 > URL: https://issues.apache.org/jira/browse/HADOOP-17308 > Project: Hadoop Common > Issue Type: Bug > Affects Versions: 2.7.0 > Reporter: Anoop Sam John > Assignee: Anoop Sam John > Priority: Critical > Labels: HBASE > Time Spent: 10m > Remaining Estimate: 0h > > In PageBlobOutputStream, write() APIs will fill the buffer and hflush/hs= ync/flush call will flush the buffer to underlying storage. Here the Azure = calls are handled in another thread=20 > {code} > private synchronized void flushIOBuffers() { > ... > lastQueuedTask =3D new WriteRequest(outBuffer.toByteArray()); > ioThreadPool.execute(lastQueuedTask); > .... > } > private class WriteRequest implements Runnable { > private final byte[] dataPayload; > private final CountDownLatch doneSignal =3D new CountDownLatch(1); > public WriteRequest(byte[] dataPayload) { > this.dataPayload =3D dataPayload; > } > public void waitTillDone() throws InterruptedException { > doneSignal.await(); > } > @Override > public void run() { > try { > LOG.debug("before runInternal()"); > runInternal(); > LOG.debug("after runInternal()"); > } finally { > doneSignal.countDown(); > } > } > private void runInternal() { > ...... > writePayloadToServer(rawPayload); > ........... > } > private void writePayloadToServer(byte[] rawPayload) { > ...... > try { > blob.uploadPages(wrapperStream, currentBlobOffset, rawPayload.len= gth, > withMD5Checking(), PageBlobOutputStream.this.opContext); > } catch (IOException ex) { > lastError =3D ex; > } catch (StorageException ex) { > lastError =3D new IOException(ex); > } > if (lastError !=3D null) { > LOG.debug("Caught error in PageBlobOutputStream#writePayloadToSer= ver()"); > } > } > } > {code} > The flushing thread will wait for the other thread to complete the Runnab= le WriteRequest. Thats fine. But when some exception happened while blob.up= loadPages, we just set that to lastError state variable. This variable is = been checked for all subsequent ops like write, flush etc. But what about = the current flush call? that is silently being succeeded.!! =20 > In standard Azure backed HBase clusters WAL is on page blob. This issue c= auses a serious issue in HBase and causes data loss! HBase think a WAL writ= e was hflushed and make row write successful. In fact the row was never gon= e to storage. > Checking the lastError variable at the end of flush op will solve the iss= ue. Then we will throw IOE from this flush() itself. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org