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-8602 Add support filter "label null" for control.sh tx utility - Fixes #4073.
Date Tue, 05 Jun 2018 15:52:09 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 0f4d6fe8d -> 3372590f9


IGNITE-8602 Add support filter "label null" for control.sh tx utility - Fixes #4073.

Signed-off-by: Alexey Goncharuk <alexey.goncharuk@gmail.com>


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

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

----------------------------------------------------------------------
 .../org/apache/ignite/internal/visor/tx/VisorTxTask.java |  2 +-
 .../org/apache/ignite/util/GridCommandHandlerTest.java   | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3372590f/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 b411e29..5a7ffdd 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
@@ -173,7 +173,7 @@ public class VisorTxTask extends VisorMultiNodeTask<VisorTxTaskArg,
Map<ClusterN
                 if (arg.getMinSize() != null && locTx.size() < arg.getMinSize())
                     continue;
 
-                if (lbMatch != null && (locTx.label() == null || !lbMatch.matcher(locTx.label()).matches()))
+                if (lbMatch != null && !lbMatch.matcher(locTx.label() == null ? "null"
: locTx.label()).matches())
                     continue;
 
                 Collection<UUID> mappings = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/ignite/blob/3372590f/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 a0b27d2..a049b8a 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
@@ -445,6 +445,17 @@ public class GridCommandHandlerTest extends GridCommonAbstractTest {
             }
         }, "--tx", "label", "^label[0-9]");
 
+        // Test filter by empty label.
+        validate(h, map -> {
+            VisorTxTaskResult res = map.get(grid(0).localNode());
+
+            for (VisorTxInfo info:res.getInfos()){
+                assertNull(info.getLabel());
+
+            }
+
+        }, "--tx", "label", "null");
+
         // test order by size.
         validate(h, map -> {
             VisorTxTaskResult res = map.get(grid(0).localNode());


Mime
View raw message