ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject incubator-ignite git commit: Ignite-24 wip
Date Sun, 25 Jan 2015 18:48:49 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-24 6f18eb54c -> 5c8869f4f


Ignite-24 wip


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5c8869f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5c8869f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5c8869f4

Branch: refs/heads/ignite-24
Commit: 5c8869f4ffdfab0f1385f16337c8bd9fbe334757
Parents: 6f18eb5
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Sun Jan 25 21:48:37 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Sun Jan 25 21:48:37 2015 +0300

----------------------------------------------------------------------
 .../kernal/managers/communication/GridIoManager.java    |  7 ++++++-
 .../grid/kernal/processors/task/GridTaskProcessor.java  |  2 +-
 .../grid/kernal/processors/task/GridTaskWorker.java     |  4 +++-
 .../util/ipc/shmem/GridIpcSharedMemoryNativeLoader.java |  3 +--
 .../gridgain/grid/session/GridSessionLoadSelfTest.java  | 12 +++++++-----
 5 files changed, 18 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5c8869f4/modules/core/src/main/java/org/gridgain/grid/kernal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/communication/GridIoManager.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/communication/GridIoManager.java
index 2d9189d..8e73b9d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/communication/GridIoManager.java
@@ -742,6 +742,10 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                     "listener is registered): " + msg);
             }
 
+            // Mark the message as processed.
+            if (msgC != null)
+                msgC.run();
+
             return;
         }
 
@@ -1715,6 +1719,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         private final IgniteUuid timeoutId;
 
         /** */
+        @GridToStringInclude
         private final Object topic;
 
         /** */
@@ -1922,7 +1927,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         }
 
         /** {@inheritDoc} */
-        @Override public synchronized String toString() {
+        @Override public String toString() {
             return S.toString(GridCommunicationMessageSet.class, this);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5c8869f4/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java
index 8e0dab6..aa42582 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java
@@ -61,7 +61,7 @@ public class GridTaskProcessor extends GridProcessorAdapter {
     private final IgniteMarshaller marsh;
 
     /** */
-    private final ConcurrentMap<IgniteUuid, GridTaskWorker<?, ?>> tasks = GridConcurrentFactory.newMap();
+    public final ConcurrentMap<IgniteUuid, GridTaskWorker<?, ?>> tasks = GridConcurrentFactory.newMap();
 
     /** */
     private boolean stopping;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5c8869f4/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskWorker.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskWorker.java
index 8e6bcb9..1e2d367 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskWorker.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskWorker.java
@@ -1393,6 +1393,8 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject
{
 
     /** {@inheritDoc} */
     @Override public String toString() {
-        return S.toString(GridTaskWorker.class, this);
+        synchronized (mux) {
+            return S.toString(GridTaskWorker.class, this);
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5c8869f4/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryNativeLoader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryNativeLoader.java
b/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryNativeLoader.java
index 8126567..abe0ecf 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryNativeLoader.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryNativeLoader.java
@@ -121,8 +121,7 @@ public class GridIpcSharedMemoryNativeLoader {
 
         // Obtain lock on file to prevent concurrent extracts.
         try (RandomAccessFile randomAccessFile = new RandomAccessFile(LOCK_FILE, "rws");
-             FileLock lock = randomAccessFile.getChannel().lock()) {
-
+             FileLock ignored = randomAccessFile.getChannel().lock()) {
             if (extractAndLoad(errs, platformSpecificResourcePath()))
                 return;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5c8869f4/modules/core/src/test/java/org/gridgain/grid/session/GridSessionLoadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionLoadSelfTest.java
b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionLoadSelfTest.java
index d9c6f78..4a4ba56 100644
--- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionLoadSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionLoadSelfTest.java
@@ -22,7 +22,6 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.resources.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.gridgain.testframework.*;
 import org.gridgain.testframework.junits.common.*;
@@ -87,7 +86,7 @@ public class GridSessionLoadSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     private void checkSessionLoad() throws Exception {
-        final Ignite ignite = grid(1);
+        final Ignite ignite = grid(0);
 
         assert ignite != null;
         assert ignite.cluster().nodes().size() == 2;
@@ -96,15 +95,18 @@ public class GridSessionLoadSelfTest extends GridCommonAbstractTest {
 
         GridTestUtils.runMultiThreaded(new Callable<Object>() {
             @Override public Object call() throws Exception {
+                ComputeTaskFuture f = null;
+
                 try {
                     for (int i = 0; i < EXEC_CNT; i++)
                         assertEquals(Boolean.TRUE,
-                            executeAsync(ignite.compute().withName("task-name"),
+                            (f = executeAsync(ignite.compute().withName("task-name"),
                                 SessionLoadTestTask.class,
-                                ignite.cluster().nodes().size() * 2).get(20000));
+                                ignite.cluster().nodes().size() * 2)).get(20000));
                 }
                 catch (Exception e) {
-                    U.error(log, "Test failed.", e);
+                    U.error(log, "Task failed: " +
+                        f != null ? f.getTaskSession().getId() : "N/A", e);
 
                     throw e;
                 }


Mime
View raw message