HoustonPutman commented on code in PR #1810:
URL: https://github.com/apache/solr/pull/1810#discussion_r1279844263


##########
solr/core/src/java/org/apache/solr/cloud/ZkController.java:
##########
@@ -2366,35 +2358,11 @@ public LeaderElector getOverseerElector() {
    *
    * @param hostName - must not be null or the empty string
    * @param hostPort - must consist only of digits, must not be null or the 
empty string
-   * @param hostContext - should not begin or end with a slash 
(leading/trailin slashes will be
-   *     ignored), must not be null, may be the empty string to denote the 
root context
    * @lucene.experimental
    * @see ZkStateReader#getBaseUrlForNodeName
    */
-  static String generateNodeName(
-      final String hostName, final String hostPort, final String hostContext) {
-    return hostName
-        + ':'
-        + hostPort
-        + '_'
-        + URLEncoder.encode(trimLeadingAndTrailingSlashes(hostContext), 
StandardCharsets.UTF_8);
-  }
-
-  /**
-   * Utility method for trimming and leading and/or trailing slashes from its 
input. May return the
-   * empty string. May return null if and only if the input is null.
-   */
-  public static String trimLeadingAndTrailingSlashes(final String in) {
-    if (null == in) return in;
-
-    String out = in;
-    if (out.startsWith("/")) {
-      out = out.substring(1);
-    }
-    if (out.endsWith("/")) {
-      out = out.substring(0, out.length() - 1);
-    }
-    return out;
+  static String generateNodeName(final String hostName, final String hostPort) 
{
+    return hostName + ':' + hostPort + '_' + "solr";

Review Comment:
   Yeah if this happens it should be a separate jira and definitely only be 
Solr 10x. I think leaving it would be fine, but a discussion for a different PR 
anyways



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to