ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [21/32] ignite git commit: IGNITE-3694 IgfsLocalSecondaryFileSystemDualAsyncSelfTest.testAppendConsistencyMultithreaded hangs
Date Mon, 22 Aug 2016 07:37:17 GMT
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 <tledkov@gridgain.com>
Authored: Thu Aug 18 15:06:04 2016 +0300
Committer: tledkov-gridgain <tledkov@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();


Mime
View raw message