Skip to content

Commit

Permalink
GG-29902 Added escaping of node consistent id in diagnostic pagelock …
Browse files Browse the repository at this point in the history
…dump file name. (apache#1265)
  • Loading branch information
ibessonov committed Jun 29, 2020
1 parent 55ed883 commit 64acaa0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.LongAdder;
import java.util.function.UnaryOperator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -1897,7 +1898,10 @@ private Map<Object, Object> generate(int from, int cnt) {
*/
@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();

Expand Down

0 comments on commit 64acaa0

Please sign in to comment.