Skip to content

Commit

Permalink
Merge pull request #6316 from flowlogix/SHORTEN_CP_NAMES
Browse files Browse the repository at this point in the history
FISH-7639 Hazelcast Monitoring Warning: workaround
  • Loading branch information
Pandrex247 authored Jul 20, 2023
2 parents 17670f7 + 09b57ad commit 01aa644
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) [2016-2021] Payara Foundation and/or its affiliates. All rights reserved.
* Copyright (c) [2016-2023] Payara Foundation and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
Expand Down Expand Up @@ -160,6 +160,13 @@ private String makeCountKey() {
}

private String makeSessionHzKey() {
return getKeyPrefix() + componentId + "/" + getClusteredSessionKey();
String sessionKey = getClusteredSessionKey();
if (componentId.startsWith(sessionKey)) {
// shorten session key if componentId is similar
// workaround for https://github.com/hazelcast/hazelcast/issues/17901
return getKeyPrefix() + sessionKey;
} else {
return getKeyPrefix() + componentId + "/" + sessionKey;
}
}
}

0 comments on commit 01aa644

Please sign in to comment.