ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: IGNITE-8467 Fixed filter minSize for transactions utility control.sh. Fixes #4069
Date Tue, 05 Jun 2018 16:02:02 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 3372590f9 -> d61c0685c


IGNITE-8467 Fixed filter minSize for transactions utility control.sh. Fixes #4069


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

Branch: refs/heads/master
Commit: d61c0685c927412908c321187bee11d2026b08b2
Parents: 3372590
Author: a-polyakov <polyakov.alexandr.alexandrovich@gmail.com>
Authored: Tue Jun 5 19:01:03 2018 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Tue Jun 5 19:01:03 2018 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/visor/tx/VisorTxTask.java |  6 +++---
 .../apache/ignite/util/GridCommandHandlerTest.java   | 15 +++++++++++++++
 2 files changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d61c0685/modules/core/src/main/java/org/apache/ignite/internal/visor/tx/VisorTxTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/tx/VisorTxTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/tx/VisorTxTask.java
index 5a7ffdd..579abbe 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/tx/VisorTxTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/tx/VisorTxTask.java
@@ -170,9 +170,6 @@ public class VisorTxTask extends VisorMultiNodeTask<VisorTxTaskArg,
Map<ClusterN
                     duration < arg.getMinDuration())
                     continue;
 
-                if (arg.getMinSize() != null && locTx.size() < arg.getMinSize())
-                    continue;
-
                 if (lbMatch != null && !lbMatch.matcher(locTx.label() == null ? "null"
: locTx.label()).matches())
                     continue;
 
@@ -194,6 +191,9 @@ public class VisorTxTask extends VisorMultiNodeTask<VisorTxTaskArg,
Map<ClusterN
                     }
                 }
 
+                if (arg.getMinSize() != null && size < arg.getMinSize())
+                    continue;
+
                 infos.add(new VisorTxInfo(locTx.xid(), duration, locTx.isolation(), locTx.concurrency(),
                     locTx.timeout(), locTx.label(), mappings, locTx.state(), size));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/d61c0685/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
index a049b8a..0ced430 100644
--- a/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
@@ -456,6 +456,21 @@ public class GridCommandHandlerTest extends GridCommonAbstractTest {
 
         }, "--tx", "label", "null");
 
+
+        // test check minSize
+        int minSize=10;
+
+        validate(h, map -> {
+            VisorTxTaskResult res = map.get(grid(0).localNode());
+
+            assertNotNull(res);
+
+            for (VisorTxInfo txInfo : res.getInfos()) {
+                assertTrue(txInfo.getSize() >= minSize);
+
+            }
+        }, "--tx", "minSize", Integer.toString(minSize));
+
         // test order by size.
         validate(h, map -> {
             VisorTxTaskResult res = map.get(grid(0).localNode());


Mime
View raw message