You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2020/12/03 11:58:36 UTC

[ignite] branch master updated: IGNITE-13795 Added escaping of node consistent id in diagnostic pagelock dump file name. - Fixes #8526.

This is an automated email from the ASF dual-hosted git repository.

sergeychugunov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 5230f39  IGNITE-13795 Added escaping of node consistent id in diagnostic pagelock dump file name. - Fixes #8526.
5230f39 is described below

commit 5230f394a7d381b7aa24bf4747a9d3f056e84753
Author: ibessonov <be...@gmail.com>
AuthorDate: Thu Dec 3 14:55:15 2020 +0300

    IGNITE-13795 Added escaping of node consistent id in diagnostic pagelock dump file name. - Fixes #8526.
    
    Signed-off-by: Sergey Chugunov <se...@gmail.com>
---
 .../test/java/org/apache/ignite/util/GridCommandHandlerTest.java    | 6 +++++-
 .../ignite/internal/processors/cache/CacheDiagnosticManager.java    | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
index 5557b5e..cd22973 100644
--- a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
+++ b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
@@ -44,6 +44,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.LongAdder;
 import java.util.function.Function;
+import java.util.function.UnaryOperator;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
@@ -2226,7 +2227,10 @@ public class GridCommandHandlerTest extends GridCommandHandlerClusterPerMethodAb
      */
     @Test
     public void testDiagnosticPageLocksTracker() throws Exception {
-        Ignite ignite = startGrids(4);
+        Ignite ignite = startGrid(0, (UnaryOperator<IgniteConfiguration>)cfg -> cfg.setConsistentId("node0/dump"));
+        startGrid(1, (UnaryOperator<IgniteConfiguration>)cfg -> cfg.setConsistentId("node1/dump"));
+        startGrid(2, (UnaryOperator<IgniteConfiguration>)cfg -> cfg.setConsistentId("node2/dump"));
+        startGrid(3, (UnaryOperator<IgniteConfiguration>)cfg -> cfg.setConsistentId("node3/dump"));
 
         Collection<ClusterNode> nodes = ignite.cluster().nodes();
 
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheDiagnosticManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheDiagnosticManager.java
index d4424dd..b68df7d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheDiagnosticManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheDiagnosticManager.java
@@ -38,7 +38,7 @@ public class CacheDiagnosticManager extends GridCacheSharedManagerAdapter {
     @Override protected void start0() throws IgniteCheckedException {
         super.start0();
 
-        String name = cctx.kernalContext().pdsFolderResolver().resolveFolders().consistentId().toString();
+        String name = U.maskForFileName(cctx.kernalContext().pdsFolderResolver().resolveFolders().consistentId().toString());
 
         pageLockTrackerManager = new PageLockTrackerManager(log, name);