ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-1.8 drop
Date Mon, 05 Dec 2016 15:40:34 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1.8-drop2 194934ca6 -> a20d71ca0


ignite-1.8 drop


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

Branch: refs/heads/ignite-1.8-drop2
Commit: a20d71ca08239ef590b5856d5d55d4c127966c82
Parents: 194934c
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Dec 5 18:40:26 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Dec 5 18:40:26 2016 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/util/future/GridCompoundFuture.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a20d71ca/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
index 907c941..f301703 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridCompoundFuture.java
@@ -192,8 +192,10 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R>
implements Ig
     @SuppressWarnings("ForLoopReplaceableByForEach")
     public final boolean hasPending() {
         synchronized (sync) {
+            int size = futuresCountNoLock();
+
             // Avoid iterator creation and collection copy.
-            for (int i = 0; i < futuresCount(); i++) {
+            for (int i = 0; i < size; i++) {
                 IgniteInternalFuture<T> fut = future(i);
 
                 if (!fut.isDone())
@@ -297,7 +299,7 @@ public class GridCompoundFuture<T, R> extends GridFutureAdapter<R>
implements Ig
     @SuppressWarnings("unchecked")
     protected final IgniteInternalFuture<T> future(int idx) {
         assert Thread.holdsLock(sync);
-        assert futs != null && idx >= 0 && idx < futuresCount();
+        assert futs != null && idx >= 0 && idx < futuresCountNoLock();
 
         if (futs instanceof IgniteInternalFuture) {
             assert idx == 0;


Mime
View raw message