ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [02/46] incubator-ignite git commit: # IGNITE-368 Order number could be shuffled, need to find max order to send it to Visor.
Date Wed, 18 Mar 2015 04:23:43 GMT
# IGNITE-368 Order number could be shuffled, need to find max order to send it to Visor.


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

Branch: refs/heads/ignite-496
Commit: c6be5f2b22f27ba1890092eecd65f2997079f7ee
Parents: a366928
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Fri Feb 27 16:22:06 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Fri Feb 27 16:22:06 2015 +0700

----------------------------------------------------------------------
 .../apache/ignite/internal/util/IgniteExceptionRegistry.java  | 6 ++----
 .../ignite/internal/visor/node/VisorNodeLastErrorsTask.java   | 7 ++++++-
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6be5f2b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
index 8a88fc4..9fe35c5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
@@ -96,10 +96,8 @@ public class IgniteExceptionRegistry {
         List<ExceptionInfo> errors = new ArrayList<>();
 
         for (ExceptionInfo error : queue) {
-            if (error.order <= order)
-                break;
-
-            errors.add(error);
+            if (error.order > order)
+                errors.add(error);
         }
 
         return errors;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c6be5f2b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeLastErrorsTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeLastErrorsTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeLastErrorsTask.java
index 980c6a3..3acd47d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeLastErrorsTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeLastErrorsTask.java
@@ -83,7 +83,12 @@ public class VisorNodeLastErrorsTask extends VisorMultiNodeTask<Map<UUID,
Long>,
 
             List<IgniteExceptionRegistry.ExceptionInfo> errors = ignite.context().exceptionRegistry().getErrors(order);
 
-            return new IgniteBiTuple<>(errors.isEmpty() ? no : errors.get(0).order(),
errors);
+            for (IgniteExceptionRegistry.ExceptionInfo error : errors) {
+                if (error.order() > order)
+                    order = error.order();
+            }
+
+            return new IgniteBiTuple<>(order, errors);
         }
 
         /** {@inheritDoc} */


Mime
View raw message