You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2016/08/22 03:26:53 UTC
[21/28] ignite git commit: IGNITE-3694
IgfsLocalSecondaryFileSystemDualAsyncSelfTest.testAppendConsistencyMultithreaded
hangs
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/master
Commit: 97d1a6f6f1d30507ad93122eb9ea63285cdffde7
Parents: 476081b
Author: tledkov-gridgain <tl...@gridgain.com>
Authored: Thu Aug 18 15:06:04 2016 +0300
Committer: tledkov-gridgain <tl...@gridgain.com>
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();