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 B0A1E200B6A for ; Mon, 22 Aug 2016 09:37:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AF53C160A91; Mon, 22 Aug 2016 07:37:00 +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 732DF160AD2 for ; Mon, 22 Aug 2016 09:36:59 +0200 (CEST) Received: (qmail 42284 invoked by uid 500); 22 Aug 2016 07:36:58 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 41700 invoked by uid 99); 22 Aug 2016 07:36:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2016 07:36:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3C1FFE08AC; Mon, 22 Aug 2016 07:36:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Date: Mon, 22 Aug 2016 07:37:17 -0000 Message-Id: <55add36f86c741a2a98951843ccf57ab@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [21/32] ignite git commit: IGNITE-3694 IgfsLocalSecondaryFileSystemDualAsyncSelfTest.testAppendConsistencyMultithreaded hangs archived-at: Mon, 22 Aug 2016 07:37:00 -0000 IGNITE-3694 IgfsLocalSecondaryFileSystemDualAsyncSelfTest.testAppendConsistencyMultithreaded hangs Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/97d1a6f6 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/97d1a6f6 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/97d1a6f6 Branch: refs/heads/ignite-3220-1 Commit: 97d1a6f6f1d30507ad93122eb9ea63285cdffde7 Parents: 476081b Author: tledkov-gridgain Authored: Thu Aug 18 15:06:04 2016 +0300 Committer: tledkov-gridgain Committed: Thu Aug 18 17:59:25 2016 +0300 ---------------------------------------------------------------------- .../ignite/internal/processors/igfs/IgfsOutputStreamImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/97d1a6f6/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsOutputStreamImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsOutputStreamImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsOutputStreamImpl.java index f6b1104..bbff93b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsOutputStreamImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsOutputStreamImpl.java @@ -315,6 +315,11 @@ class IgfsOutputStreamImpl extends IgfsOutputStream { ", fileInfo=" + fileInfo + ']', e); } + // Finish batch before file unlocking to support the assertion that unlocked file batch, + // if any, must be in finishing state (e.g. append see more IgfsImpl.newBatch) + if (batch != null) + batch.finish(); + // Unlock the file after data is flushed. try { if (flushSuccess && space > 0) @@ -332,8 +337,6 @@ class IgfsOutputStreamImpl extends IgfsOutputStream { // Finally, await secondary file system flush. if (batch != null) { - batch.finish(); - if (mode == DUAL_SYNC) { try { batch.await();