[jira] [Commented] (SOLR-17689) Admin UI: Cloud -> Nodes -> Heap works only with fixed heap size

2025-03-04 Thread Bernd Wahlen (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-17689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17932347#comment-17932347
 ] 

Bernd Wahlen commented on SOLR-17689:
-

thank you for the quick and detailed answer. I replaced that unusual config 
with recommended SOLR_HEAP.

> Admin UI: Cloud -> Nodes -> Heap works only with fixed heap size
> 
>
> Key: SOLR-17689
> URL: https://issues.apache.org/jira/browse/SOLR-17689
> Project: Solr
>  Issue Type: Improvement
>  Components: Admin UI
>Affects Versions: 9.8
>Reporter: Bernd Wahlen
>Priority: Minor
>
> when using fixed heap size e.g.
> -Xms2g
> -Xmx2g
> -XX:+UseZGC
> this metics show useful value (heap percentage).
> Without such configuration
> -Xmx512m
> -XX:+UseZGC
> it shows dangerous (red) e.g. 96%
> Dashboard shows the correct value: 98/102M, 19.9% JVM-Memory of 512M,
> because JVM releases the unusued memory.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (SOLR-17689) Admin UI: Cloud -> Nodes -> Heap works only with fixed heap size

2025-03-04 Thread Jira


[ 
https://issues.apache.org/jira/browse/SOLR-17689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17932317#comment-17932317
 ] 

Jan Høydahl commented on SOLR-17689:


Hi. Seems you have configured a non-standard heap setting for Solr, without the 
{{-Xms}} option. This is not a recommended production setting, since it may 
cause memory fragmentation and pauses during scale up/down. It is highly 
recommended to set {{-Xms}} equal to {{-Xmx}} as documented in 
[https://solr.apache.org/guide/solr/latest/deployment-guide/jvm-settings.html#choosing-memory-heap-settings]
 

By default you will see that both are set, and if you tune with {{SOLR_HEAP}} 
variable, both are also set to same value.

So in my opinion, we the UI works as it should for both the default and 
recommended heap settings, and we should not encourage use of dynamic heap 
resizing.

The reason for the behavior is likely that the UI pulls current heap size from 
a metric value (which in your case is dynamic) and not from xmx.

I'll not object to a fix that always uses Xmx, but I'll not pursue this myself. 
If you want to contribute a Pull Request I can help review.

> Admin UI: Cloud -> Nodes -> Heap works only with fixed heap size
> 
>
> Key: SOLR-17689
> URL: https://issues.apache.org/jira/browse/SOLR-17689
> Project: Solr
>  Issue Type: Improvement
>  Components: Admin UI
>Affects Versions: 9.8
>Reporter: Bernd Wahlen
>Priority: Minor
>
> when using fixed heap size e.g.
> -Xms2g
> -Xmx2g
> -XX:+UseZGC
> this metics show useful value (heap percentage).
> Without such configuration
> -Xmx512m
> -XX:+UseZGC
> it shows dangerous (red) e.g. 96%
> Dashboard shows the correct value: 98/102M, 19.9% JVM-Memory of 512M,
> because JVM releases the unusued memory.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



Re: [I] Security.json is never copied to Zookeeper while creating Solr 9.8.0 Clusters [solr-operator]

2025-03-04 Thread via GitHub


jdgiddings commented on issue #762:
URL: https://github.com/apache/solr-operator/issues/762#issuecomment-2698560802

   I ran some further tests. I added the SECURITY_JSON environment variable to 
the `solrcloud-node` container and (roughly) ran the commands from `setup-zk` 
and they worked! Here's the commands in the order I ran them
   
   1. `solr zk cp zk:/security.json /tmp/current_security.json` Worked
   2. `cat /tmp/current_security.json` was {}
   3. `echo $SECURITY_JSON > /tmp/security.json` Worked
   4. `cat /tmp/security.json` was the full contents of security.json
   5. `solr zk cp /tmp/security.json zk:/security.json` Worked
   
   This *should be* pretty much identical to the commands that run in 
`setup-zk`, but I see the logs from `setup-zk` are `No security.json found. Put 
new security.json in ZK` which indicates that `solr zk cp zk:/security.json 
/tmp/current_security.json` is exiting with code 1. I'm not sure why this would 
happen, considering that it exits with code 0 when running it in 
`solrcloud-node`
   
   the `ZK_HOST`, `ZK_CHROOT`, and `ZK_SERVER` environment variables are 
identical between the two containers
   


-- 
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



Re: [PR] JavaBinUpdateRequestCodec: Dead code removal [solr]

2025-03-04 Thread via GitHub


dsmiley commented on PR #3207:
URL: https://github.com/apache/solr/pull/3207#issuecomment-2698666019

   Plan to merge Friday to main; no changes.txt / JIRA.  Merge commit message:
   > Dead code removal in JavaBinUpdateRequestCodec.
   > Compatibility: It's probable that an old SolrJ might sometimes send data 
encoded in a way that's no longer understood.  It's also possible a user is 
using JavaBinCodec directly to do the same.  Henceforth, they will get an 
error.  As we have very little backwards compatibility tests, I can't know for 
sure. 


-- 
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



Re: [PR] SOLR-17684: SolrJ Reference Guide (Ping) - Incorrect Status Retrieval [solr]

2025-03-04 Thread via GitHub


umut-sar commented on code in PR #3237:
URL: https://github.com/apache/solr/pull/3237#discussion_r1980257066


##
solr/solr-ref-guide/modules/deployment-guide/examples/UsingPingRefGuideExamplesTest.java:
##
@@ -0,0 +1,128 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.solr.client.solrj.SolrClient;
+import org.apache.solr.client.solrj.beans.Field;
+import org.apache.solr.client.solrj.request.CollectionAdminRequest;
+import org.apache.solr.client.solrj.request.SolrPing;
+import org.apache.solr.client.solrj.response.CollectionAdminResponse;
+import org.apache.solr.client.solrj.response.SolrPingResponse;
+import org.apache.solr.cloud.SolrCloudTestCase;
+import org.apache.solr.util.ExternalPaths;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Example Ping usage.
+ *
+ * Snippets surrounded by "tag" and "end" comments are extracted and used 
in the Solr Reference
+ * Guide.
+ */
+public class UsingPingRefGuideExamplesTest extends SolrCloudTestCase {
+
+  private static final int NUM_LIVE_NODES = 1;
+
+  @BeforeClass
+  public static void setUpCluster() throws Exception {
+configureCluster(NUM_LIVE_NODES)
+.addConfig("conf", new 
File(ExternalPaths.TECHPRODUCTS_CONFIGSET).toPath())
+.configure();
+
+CollectionAdminResponse response =
+CollectionAdminRequest.createCollection("techproducts", "conf", 1, 1)
+.process(cluster.getSolrClient());
+cluster.waitForActiveCollection("techproducts", 1, 1);
+  }
+
+  @Before
+  @Override
+  public void setUp() throws Exception {
+super.setUp();
+final SolrClient client = getSolrClient();
+
+final List products = new ArrayList<>();

Review Comment:
   Removed



##
solr/solr-ref-guide/modules/deployment-guide/examples/UsingPingRefGuideExamplesTest.java:
##
@@ -0,0 +1,128 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.solr.client.solrj.SolrClient;
+import org.apache.solr.client.solrj.beans.Field;
+import org.apache.solr.client.solrj.request.CollectionAdminRequest;
+import org.apache.solr.client.solrj.request.SolrPing;
+import org.apache.solr.client.solrj.response.CollectionAdminResponse;
+import org.apache.solr.client.solrj.response.SolrPingResponse;
+import org.apache.solr.cloud.SolrCloudTestCase;
+import org.apache.solr.util.ExternalPaths;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Example Ping usage.
+ *
+ * Snippets surrounded by "tag" and "end" comments are extracted and used 
in the Solr Reference
+ * Guide.
+ */
+public class UsingPingRefGuideExamplesTest extends SolrCloudTestCase {
+
+  private static final int NUM_LIVE_NODES = 1;
+
+  @BeforeClass
+  public static void setUpCluster() throws Exception {
+configureCluster(NUM_LIVE_NODES)
+.addConfig("conf", new 
File(ExternalPaths.TECHPRODUCTS_CONFIGSET).toPath())
+.configure();
+
+CollectionAdminResponse response =
+CollectionAdminRequest.createCollection("techproducts", "conf", 1, 1)
+.process(cluster.getSolrClient());
+cluster.waitForActiveCollection("techproducts", 1, 1);
+  }
+
+  @Before
+  @Overri

Re: [PR] SOLR-17684: SolrJ Reference Guide (Ping) - Incorrect Status Retrieval [solr]

2025-03-04 Thread via GitHub


umut-sar commented on code in PR #3237:
URL: https://github.com/apache/solr/pull/3237#discussion_r1980257399


##
solr/solr-ref-guide/modules/deployment-guide/examples/UsingPingRefGuideExamplesTest.java:
##
@@ -0,0 +1,128 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.solr.client.solrj.SolrClient;
+import org.apache.solr.client.solrj.beans.Field;
+import org.apache.solr.client.solrj.request.CollectionAdminRequest;
+import org.apache.solr.client.solrj.request.SolrPing;
+import org.apache.solr.client.solrj.response.CollectionAdminResponse;
+import org.apache.solr.client.solrj.response.SolrPingResponse;
+import org.apache.solr.cloud.SolrCloudTestCase;
+import org.apache.solr.util.ExternalPaths;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Example Ping usage.
+ *
+ * Snippets surrounded by "tag" and "end" comments are extracted and used 
in the Solr Reference
+ * Guide.
+ */
+public class UsingPingRefGuideExamplesTest extends SolrCloudTestCase {
+
+  private static final int NUM_LIVE_NODES = 1;
+
+  @BeforeClass
+  public static void setUpCluster() throws Exception {
+configureCluster(NUM_LIVE_NODES)
+.addConfig("conf", new 
File(ExternalPaths.TECHPRODUCTS_CONFIGSET).toPath())
+.configure();
+
+CollectionAdminResponse response =
+CollectionAdminRequest.createCollection("techproducts", "conf", 1, 1)
+.process(cluster.getSolrClient());
+cluster.waitForActiveCollection("techproducts", 1, 1);
+  }
+
+  @Before
+  @Override
+  public void setUp() throws Exception {
+super.setUp();
+final SolrClient client = getSolrClient();
+
+final List products = new ArrayList<>();
+products.add(new TechProduct("1", "Fitbit Alta"));
+products.add(new TechProduct("2", "Sony Walkman"));
+products.add(new TechProduct("3", "Garmin GPS"));
+
+client.addBeans("techproducts", products);
+client.commit("techproducts");
+  }
+
+  @After
+  @Override
+  public void tearDown() throws Exception {
+super.tearDown();
+
+final SolrClient client = getSolrClient();
+client.deleteByQuery("techproducts", "*:*");
+client.commit("techproducts");
+  }
+
+  private SolrClient getSolrClient() {
+return cluster.getSolrClient();
+  }
+
+  @Test
+  public void solrJExampleWithSolrPing() throws Exception {
+
+final SolrClient solrClient = getSolrClient();
+String collectionName = "techproducts";
+
+// tag::solrj-example-with-solrping[]
+SolrPing ping = new SolrPing();
+ping.getParams()
+.add("distrib", "true"); // To make it a distributed request against a 
collection
+SolrPingResponse rsp = ping.process(solrClient, collectionName);
+String status = (String) rsp.getResponse().get("status");
+// end::solrj-example-with-solrping[]
+
+assertEquals("OK", status);
+  }
+
+  @Test
+  public void solrJExampleWithSolrClient() throws Exception {
+
+String collectionName = "techproducts";
+
+// tag::solrj-example-with-solrclient[]
+final SolrClient solrClient = getSolrClient();
+SolrPingResponse pingResponse = solrClient.ping(collectionName);
+String status = (String) pingResponse.getResponse().get("status");
+// end::solrj-example-with-solrclient[]
+
+assertEquals("OK", status);
+  }
+
+  public static class TechProduct {

Review Comment:
   Removed



-- 
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



Re: [PR] SOLR-17684: SolrJ Reference Guide (Ping) - Incorrect Status Retrieval [solr]

2025-03-04 Thread via GitHub


umut-sar commented on PR #3237:
URL: https://github.com/apache/solr/pull/3237#issuecomment-2699050867

   Almost all code / command snippets in the reference guide are hard coded, 
expect the one SolrJ class. I think we could use BATS for simple shell commands 
but suggest 
[Testcontainers](https://testcontainers.com/guides/getting-started-with-testcontainers-for-java/)
 for complex bash scripts, which must run in isolated environments. But 
testcontainers is heavier, since it spin up docker container and also need a 
Docker environment.


-- 
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



Re: [PR] SOLR-17684: SolrJ Reference Guide (Ping) - Incorrect Status Retrieval [solr]

2025-03-04 Thread via GitHub


madrob commented on PR #3237:
URL: https://github.com/apache/solr/pull/3237#issuecomment-2699055852

   Does the new java file get compiled and tested by our existing grade 
configuration without any additional changes? That's super cool.


-- 
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



[jira] [Updated] (SOLR-17638) Some CLI errors not logged when starting prometheus exporter

2025-03-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/SOLR-17638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SOLR-17638:
--
Labels: pull-request-available  (was: )

> Some CLI errors not logged when starting prometheus exporter
> 
>
> Key: SOLR-17638
> URL: https://issues.apache.org/jira/browse/SOLR-17638
> Project: Solr
>  Issue Type: Bug
>  Components: contrib - prometheus-exporter
>Affects Versions: 9.8
>Reporter: Philipp Trulson
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Hey everyone, we are currently upgrading our 8.11 setup to 9.8 and right now 
> I'm working on the prometheus-exporter.
> To my surprise, the program was exiting directly without any output at all, 
> which was very frustrating. Only after manually putting a log4j2 config in 
> the classpath the culprit was finally visible:
>  
> {noformat}
> org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: 
> --zkhost{noformat}
>  
> So the program was exiting because the cli option was renamed from zkhost to 
> zk-host, would have been an easy fix normally, _if_ the program would have 
> told me. What's funny though is that other messages are being logged to the 
> console and I can't find the difference atm. My guess is that something got 
> messed up after switching the cli lib in SOLR-16996.
> Reproduction:
> {code:java}
> $ podman run --rm -it --entrypoint bash solr:9.8.0 
> /opt/solr/prometheus-exporter/bin/solr-exporter --port=9854
> ERROR - 2025-01-30 08:52:53.052; 
> org.apache.solr.prometheus.exporter.SolrExporter; Must provide either 
> --base-url or --zk-host
> Exception in thread "main" java.lang.NullPointerException: Cannot invoke 
> "org.apache.solr.prometheus.exporter.SolrScrapeConfiguration.getType()" 
> because "configuration" is null
>     at 
> org.apache.solr.prometheus.exporter.SolrExporter.createScraper(SolrExporter.java:127)
>     at 
> org.apache.solr.prometheus.exporter.SolrExporter.(SolrExporter.java:90)
>     at 
> org.apache.solr.prometheus.exporter.SolrExporter.main(SolrExporter.java:426)
> $ podman run --rm -it --entrypoint bash solr:9.8.0 
> /opt/solr/prometheus-exporter/bin/solr-exporter --zkhost=lalala
>   -> no output{code}
>  
> (Small sidenote: The program errors when not providing --base-url or 
> --zk-host, even though the help text says {_}If omitted both the -b parameter 
> and the -z parameter, connect to http://localhost:8983/solr{_}. Not sure if 
> it's worth opening a separate issue for that, looks like the CLI args are 
> being worked on already in 9.9)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[PR] SOLR-17638 Some CLI errors not logged when starting prometheus exporter [solr]

2025-03-04 Thread via GitHub


stillalex opened a new pull request, #3236:
URL: https://github.com/apache/solr/pull/3236

   https://issues.apache.org/jira/browse/SOLR-17638
   
   
   
   
   # Description
   
   Please provide a short description of the changes you're making with this 
pull request.
   
   # Solution
   
   Please provide a short description of the approach taken to implement your 
solution.
   
   # Tests
   
   Please describe the tests you've developed or run to confirm this patch 
implements the feature or solves the problem.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [ ] I have reviewed the guidelines for [How to 
Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my 
code conforms to the standards described there to the best of my ability.
   - [ ] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [ ] I have given Solr maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended, not available for 
branches on forks living under an organisation)
   - [ ] I have developed this patch against the `main` branch.
   - [ ] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference 
Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


-- 
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



[jira] [Commented] (SOLR-17638) Some CLI errors not logged when starting prometheus exporter

2025-03-04 Thread Alex Deparvu (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-17638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17932341#comment-17932341
 ] 

Alex Deparvu commented on SOLR-17638:
-

put together a PR for this [https://github.com/apache/solr/pull/3236] 
[~epugh] if you have a few spare minutes please take a look!

> Some CLI errors not logged when starting prometheus exporter
> 
>
> Key: SOLR-17638
> URL: https://issues.apache.org/jira/browse/SOLR-17638
> Project: Solr
>  Issue Type: Bug
>  Components: contrib - prometheus-exporter
>Affects Versions: 9.8
>Reporter: Philipp Trulson
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Hey everyone, we are currently upgrading our 8.11 setup to 9.8 and right now 
> I'm working on the prometheus-exporter.
> To my surprise, the program was exiting directly without any output at all, 
> which was very frustrating. Only after manually putting a log4j2 config in 
> the classpath the culprit was finally visible:
>  
> {noformat}
> org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: 
> --zkhost{noformat}
>  
> So the program was exiting because the cli option was renamed from zkhost to 
> zk-host, would have been an easy fix normally, _if_ the program would have 
> told me. What's funny though is that other messages are being logged to the 
> console and I can't find the difference atm. My guess is that something got 
> messed up after switching the cli lib in SOLR-16996.
> Reproduction:
> {code:java}
> $ podman run --rm -it --entrypoint bash solr:9.8.0 
> /opt/solr/prometheus-exporter/bin/solr-exporter --port=9854
> ERROR - 2025-01-30 08:52:53.052; 
> org.apache.solr.prometheus.exporter.SolrExporter; Must provide either 
> --base-url or --zk-host
> Exception in thread "main" java.lang.NullPointerException: Cannot invoke 
> "org.apache.solr.prometheus.exporter.SolrScrapeConfiguration.getType()" 
> because "configuration" is null
>     at 
> org.apache.solr.prometheus.exporter.SolrExporter.createScraper(SolrExporter.java:127)
>     at 
> org.apache.solr.prometheus.exporter.SolrExporter.(SolrExporter.java:90)
>     at 
> org.apache.solr.prometheus.exporter.SolrExporter.main(SolrExporter.java:426)
> $ podman run --rm -it --entrypoint bash solr:9.8.0 
> /opt/solr/prometheus-exporter/bin/solr-exporter --zkhost=lalala
>   -> no output{code}
>  
> (Small sidenote: The program errors when not providing --base-url or 
> --zk-host, even though the help text says {_}If omitted both the -b parameter 
> and the -z parameter, connect to http://localhost:8983/solr{_}. Not sure if 
> it's worth opening a separate issue for that, looks like the CLI args are 
> being worked on already in 9.9)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Resolved] (SOLR-17689) Admin UI: Cloud -> Nodes -> Heap works only with fixed heap size

2025-03-04 Thread Bernd Wahlen (Jira)


 [ 
https://issues.apache.org/jira/browse/SOLR-17689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bernd Wahlen resolved SOLR-17689.
-
Resolution: Not A Problem

> Admin UI: Cloud -> Nodes -> Heap works only with fixed heap size
> 
>
> Key: SOLR-17689
> URL: https://issues.apache.org/jira/browse/SOLR-17689
> Project: Solr
>  Issue Type: Improvement
>  Components: Admin UI
>Affects Versions: 9.8
>Reporter: Bernd Wahlen
>Priority: Minor
>
> when using fixed heap size e.g.
> -Xms2g
> -Xmx2g
> -XX:+UseZGC
> this metics show useful value (heap percentage).
> Without such configuration
> -Xmx512m
> -XX:+UseZGC
> it shows dangerous (red) e.g. 96%
> Dashboard shows the correct value: 98/102M, 19.9% JVM-Memory of 512M,
> because JVM releases the unusued memory.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



Re: [I] Security.json is never copied to Zookeeper while creating Solr 9.8.0 Clusters [solr-operator]

2025-03-04 Thread via GitHub


jdgiddings commented on issue #762:
URL: https://github.com/apache/solr-operator/issues/762#issuecomment-2698446806

   I have confirmed it is not a race condition. I spun up the zookeepers first 
and then spun up the first solr node. The issue appears to lie in the command 
on `setup-zk`
   


-- 
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



Re: [PR] SOLR-17673: Disable multithreaded search at the node level by default [solr]

2025-03-04 Thread via GitHub


dsmiley commented on code in PR #3183:
URL: https://github.com/apache/solr/pull/3183#discussion_r1980230626


##
solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-9.adoc:
##
@@ -67,6 +67,12 @@ It is always strongly recommended that you fully reindex 
your documents after a
 In Solr 8, it was possible to add docValues to a schema without re-indexing 
via `UninvertDocValuesMergePolicy`, an advanced/expert utility.
 Due to changes in Lucene 9, that isn't possible any more.
 
+== Solr 9.8.1
+=== Configuration
+In solrconfig.xml, the `indexSearcherExecutorThreads` now defaults to 0.

Review Comment:
   No; in solr.xml.
   
   I wish this had a default using an EnvUtils read so we needn't edit a config 
file to manipulate it.  Env vars are more convenient for random/standalone 
toggles/configurables.



-- 
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



Re: [PR] SOLR-17638 Some CLI errors not logged when starting prometheus exporter [solr]

2025-03-04 Thread via GitHub


epugh commented on PR #3236:
URL: https://github.com/apache/solr/pull/3236#issuecomment-2698775417

   Thanks for jumping on this @stillalex and looks good.


-- 
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



Re: [PR] SimpleOrderedMap MapWriter constructor [solr]

2025-03-04 Thread via GitHub


renatoh commented on code in PR #3235:
URL: https://github.com/apache/solr/pull/3235#discussion_r1980187064


##
solr/solrj/src/java/org/apache/solr/common/params/SolrParams.java:
##
@@ -69,18 +69,16 @@ public String get(String param, String def) {
 
   @Override
   public void writeMap(EntryWriter ew) throws IOException {
-// TODO don't call toNamedList; more efficiently implement here
-// note: multiple values, if present, are a String[] under 1 key
-toNamedList()
-.forEach(
-(k, v) -> {
-  if (v == null || "".equals(v)) return;
-  try {
-ew.put(k, v);
-  } catch (IOException e) {
-throw new RuntimeException("Error serializing", e);
-  }
-});
+for (Entry entry : this) {
+  String[] value = entry.getValue();
+  // if only one value, don't wrap in an array
+  if (value.length == 1) {
+assert value[0] != null;

Review Comment:
   this 'assert' looks a bit out of place to me.  if value.lenght > 1, we do 
not care about null-values in the array, but if we have only one we do check 
for null. Also wouldn't it be better to just ignore the null value ?



-- 
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



Re: [PR] SOLR-17690 Make solr zk tools read ZK_HOST environment [solr]

2025-03-04 Thread via GitHub


janhoy commented on code in PR #3240:
URL: https://github.com/apache/solr/pull/3240#discussion_r1980520237


##
solr/core/src/java/org/apache/solr/cli/CLIUtils.java:
##
@@ -226,6 +226,11 @@ public static String getZkHost(CommandLine cli) throws 
Exception {
   return zkHost;
 }
 
+//zkHost = EnvUtils.getProperty("zkHost");
+//if (zkHost != null && !zkHost.isBlank()) {
+//  return zkHost;
+//}

Review Comment:
   This is the fix, commented out to prove failing test. The 
`CLIUtils#getZkHost(cli)` util is used by many tools. Not sure if all tools 
document the support for `ZK_HOST`, but the `zk cp` tool does. Reading property 
`zkHost` works since `ZK_HOST` env is explicitly put into this sysProp by 
EnvUtils.



-- 
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



Re: [PR] SmokeTestRelease Added support for multiple JDK [solr]

2025-03-04 Thread via GitHub


github-actions[bot] commented on PR #2685:
URL: https://github.com/apache/solr/pull/2685#issuecomment-2699303511

   This PR has had no activity for 60 days and is now labeled as stale.  Any 
new activity will remove the stale label.  To attract more reviewers, please 
tag people who might be familiar with the code area and/or notify the 
d...@solr.apache.org mailing list. To exempt this PR from being marked as 
stale, make it a draft PR or add the label "exempt-stale". If left unattended, 
this PR will be closed after another 60 days of inactivity. Thank you for your 
contribution!


-- 
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



Re: [PR] Ability to run only SolrCloud tests [solr]

2025-03-04 Thread via GitHub


github-actions[bot] commented on PR #2825:
URL: https://github.com/apache/solr/pull/2825#issuecomment-2699303447

   This PR has had no activity for 60 days and is now labeled as stale.  Any 
new activity will remove the stale label.  To attract more reviewers, please 
tag people who might be familiar with the code area and/or notify the 
d...@solr.apache.org mailing list. To exempt this PR from being marked as 
stale, make it a draft PR or add the label "exempt-stale". If left unattended, 
this PR will be closed after another 60 days of inactivity. Thank you for your 
contribution!


-- 
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



Re: [PR] SOLR-17635: unmarshalling Map to SimpleOrderedMap if key i of type St… [solr]

2025-03-04 Thread via GitHub


renatoh commented on PR #3163:
URL: https://github.com/apache/solr/pull/3163#issuecomment-2700070953

   > I have a some doubts that gnaw at me pertaining to the performance risks 
of O(1) maps suddenly becoming O(N). It doesn't sit well with me. You had 
suggested changing SimpleOrderedMap to be LinkedHashMap based. That's 
definitely safer, and whatever extra overhead is involved there should be 
fairly minor. Maybe we should pause merging this until pursuing that. Pursuing 
that probably means deprecating/removing indexed access to NamedList, requiring 
instead callers use iterators.
   But if SMO is backed by a LinkedHashMap, wouldn't then these changes become 
obsolete? What is the point of unmarshalling to SMO (backed by a LinkedHashMap) 
instead of a directly to a LinkedHashMap?


-- 
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



[jira] [Created] (SOLR-17689) Admin UI: Cloud -> Nodes -> Heap works only with fixed heap size

2025-03-04 Thread Bernd Wahlen (Jira)
Bernd Wahlen created SOLR-17689:
---

 Summary: Admin UI: Cloud -> Nodes -> Heap works only with fixed 
heap size
 Key: SOLR-17689
 URL: https://issues.apache.org/jira/browse/SOLR-17689
 Project: Solr
  Issue Type: Improvement
  Components: Admin UI
Affects Versions: 9.8
Reporter: Bernd Wahlen


when using fixed heap size e.g.
-Xms2g
-Xmx2g
-XX:+UseZGC

this metics show useful value (heap percentage).

Without such configuration
-Xmx512m
-XX:+UseZGC

it shows dangerous (red) e.g. 96%
Dashboard shows the correct value: 98/102M, 19.9% JVM-Memory of 512M,
because JVM releases the unusued memory.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



Re: [I] Security.json is never copied to Zookeeper while creating Solr 9.8.0 Clusters [solr-operator]

2025-03-04 Thread via GitHub


janhoy commented on issue #762:
URL: https://github.com/apache/solr-operator/issues/762#issuecomment-2696664654

   Can you whip together a **minimum reproduction** of this? E.g.
   
   1. Install solr operator 0.9.0
   2. Create a secret with a security.json as follows: bla bla kubectl apply 
bla bla
   3. Install a solr cluster with this yaml specifying security etc - kubectl 
apply etc
   4. Observe how cluster is created without applying security
   
   Your linked issue was a different error preventing 9.7 to work properly. 
There were then fixes in operator (as linked to) and solr, but there could be 
another regression here.


-- 
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



Re: [PR] SOLR-17635: unmarshalling Map to SimpleOrderedMap if key i of type St… [solr]

2025-03-04 Thread via GitHub


dsmiley commented on PR #3163:
URL: https://github.com/apache/solr/pull/3163#issuecomment-2700120656

   > But if SMO is backed by a LinkedHashMap, wouldn't then these changes 
become obsolete? What is the point of unmarshalling to SMO (backed by a 
LinkedHashMap) instead of a directly to a LinkedHashMap?
   
   Only an SMO is also a NamedList.  A LinkedHashMap itself is not.
   
   I was thinking about the need for this a bit more.  The primary concern is a 
SolrJ 9 reading data sent from Solr 10, which will see more expanded use of 
SimpleOrderedMap that was previously a NamedList.  Other circumstances can 
leave this disabled by default.  In Solr 9 specifically, we could change 
BinaryResponseParser to detect the version of the writer in some way TBD and 
then act accordingly.  A separate issue/PR.


-- 
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



Re: [I] Security.json is never copied to Zookeeper while creating Solr 9.8.0 Clusters [solr-operator]

2025-03-04 Thread via GitHub


jdgiddings commented on issue #762:
URL: https://github.com/apache/solr-operator/issues/762#issuecomment-2698325052

   Here is a minimal example where the bug occurs. Please excuse the Azure 
stuff, we're hosting it on AKS
   
   ```yaml
   apiVersion: v1
   kind: Secret
   metadata:
 name: security-json
 namespace: dev
   data:
 security.json: REDACTED
 type: Opaque
   ---
   apiVersion: v1
   kind: Secret
   metadata:
 name: solr-basic-auth
 namespace: dev
   data:
 password: REDACTED
 username: REDACTED
   type: kubernetes.io/basic-auth
   ---
   apiVersion: v1
   kind: ConfigMap
   metadata:
 name: solr-config
 namespace: dev  
   data:
 solr.xml: |
   
   
   10240
   
   ${host:}
   ${hostPort:80}
   ${hostContext:solr}
   ${genericCoreNodeNames:true}
   ${zkClientTimeout:3}
   ${distribUpdateSoTimeout:60}
   ${distribUpdateConnTimeout:6}
   ${zkCredentialsProvider:org.apache.solr.common.cloud.DefaultZkCredentialsProvider}
   ${zkACLProvider:org.apache.solr.common.cloud.DefaultZkACLProvider}
   
   
   ${socketTimeout:60}
   ${connTimeout:6}
 
   
   ---
   apiVersion: solr.apache.org/v1beta1
   kind: SolrCloud
   metadata:
 name: test
 namespace: dev
   spec:
 availability:
   podDisruptionBudget:
 enabled: false
 busyBoxImage:
   repository: busybox
   tag: 1.28.0-glibc
 customSolrKubeOptions:
   configMapOptions:
 providedConfigMap: solr-config
   podOptions:
 nodeSelector:
   kubernetes.azure.com/scalesetpriority: spot
 tolerations:
   - effect: NoSchedule
 key: kubernetes.azure.com/scalesetpriority
 operator: Equal
 value: spot
 dataStorage:
   persistent:
 pvcTemplate:
   metadata: {}
   spec:
 accessModes:
   - ReadWriteOnce
 resources:
   requests:
 storage: 8Gi
 storageClassName: premium-ssd-v2
 reclaimPolicy: Retain
 replicas: 3
 scaling:
   populatePodsOnScaleUp: true
   vacatePodsOnScaleDown: true
 solrAddressability:
   commonServicePort: 80
   podPort: 8983
 solrImage:
   repository: solr
   tag: 9.8.0
 solrJavaMem: '-Xms8G -Xmx8G'
 solrLogLevel: INFO
 solrSecurity:
   authenticationType: Basic
   basicAuthSecret: solr-basic-auth
   bootstrapSecurityJson:
 key: security.json
 name: security-json
 zookeeperRef:
   provided:
 image:
   pullPolicy: IfNotPresent
   repository: pravega/zookeeper
 maxUnavailableReplicas: 1
 persistence:
   reclaimPolicy: Retain
   spec:
 accessModes:
   - ReadWriteOnce
 resources:
   requests:
 storage: 1Gi
 storageClassName: standard-ssd-zrs
 replicas: 3
 zookeeperPodPolicy:
   nodeSelector:
 kubernetes.azure.com/scalesetpriority: spot
   securityContext:
 fsGroup: 1000
   tolerations:
 - effect: NoSchedule
   key: kubernetes.azure.com/scalesetpriority
   operator: Equal
   value: spot
   ```


-- 
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



Re: [PR] SOLR-17635: unmarshalling Map to SimpleOrderedMap if key i of type St… [solr]

2025-03-04 Thread via GitHub


renatoh commented on PR #3163:
URL: https://github.com/apache/solr/pull/3163#issuecomment-2698840306

   @dsmiley All tests are passing now, are we able to merge?


-- 
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



[PR] Ref-guide: upgrade notes: fix wrong file reference. [solr]

2025-03-04 Thread via GitHub


dsmiley opened a new pull request, #3239:
URL: https://github.com/apache/solr/pull/3239

   (no comment)


-- 
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



Re: [PR] SOLR-17684: SolrJ Reference Guide (Ping) - Incorrect Status Retrieval [solr]

2025-03-04 Thread via GitHub


epugh commented on PR #3237:
URL: https://github.com/apache/solr/pull/3237#issuecomment-2698978837

   For example, I wonder if we have complex shell script commands that we could 
test with BATS, and then do the same cut/n/paste into the Ref Guide?


-- 
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



Re: [PR] SOLR-17684: SolrJ Reference Guide (Ping) - Incorrect Status Retrieval [solr]

2025-03-04 Thread via GitHub


epugh commented on PR #3237:
URL: https://github.com/apache/solr/pull/3237#issuecomment-2698977316

   Thanks, running the tests and if they pass will merge!   This is a nice 
improvement..Feel free to tag me on any other PR's you come up with.  I 
wonder if there are other places in the ref guide we could use this technique?


-- 
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



Re: [PR] SOLR-17684: SolrJ Reference Guide (Ping) - Incorrect Status Retrieval [solr]

2025-03-04 Thread via GitHub


umut-sar commented on PR #3237:
URL: https://github.com/apache/solr/pull/3237#issuecomment-2699066174

   @madrob  Yes, It worked without additional changes.


-- 
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



Re: [PR] SOLR-17683: Remove CurrencyField [solr]

2025-03-04 Thread via GitHub


dsmiley commented on code in PR #3212:
URL: https://github.com/apache/solr/pull/3212#discussion_r1980093462


##
solr/core/src/java/org/apache/solr/schema/ExchangeRateProvider.java:
##
@@ -21,7 +21,7 @@
 import org.apache.lucene.util.ResourceLoader;
 import org.apache.solr.common.SolrException;
 
-/** Interface for providing pluggable exchange rate providers to 
@CurrencyField */
+/** Interface for providing pluggable exchange rate providers to 
@CurrencyFieldType */

Review Comment:
   ```suggestion
   /** Interface for providing pluggable exchange rate providers to {@link 
CurrencyFieldType} */
   ```



-- 
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



[PR] SOLR-17684: SolrJ Reference Guide (Ping) - Incorrect Status Retrieval [solr]

2025-03-04 Thread via GitHub


umut-sar opened a new pull request, #3237:
URL: https://github.com/apache/solr/pull/3237

   
   
   - Update ping.adoc with references from unit test.
   - Add unit test to illustrate the usage of the ping response.
   
   https://issues.apache.org/jira/browse/SOLR-17684
   
   
   # Description
   
   The SolrJ Reference Guide provides incorrect examples for retrieving the 
ping status of a collection.
   
   https://solr.apache.org/guide/solr/9_8/deployment-guide/ping.html 
   
   # Solution
   
   pingResponse.getStatus() returns the status of the ping request itself 
(status=0), not the collection's ping status ("OK").
   Since getResponse() returns a NamedList, the value must be 
explicitly cast to a String or converted using .toString().
   
   # Tests
   
   Created a new test class named: UsingPingRefGuideExamplesTest
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to 
Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my 
code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [  ] I have given Solr maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended, not available for 
branches on forks living under an organisation)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew check`.
   - [x] I have added tests for my changes.
   - [x] I have added documentation for the [Reference 
Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)


-- 
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



[jira] [Updated] (SOLR-17684) Issue in SolrJ Reference Guide (Ping) - Incorrect Status Retrieval

2025-03-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/SOLR-17684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SOLR-17684:
--
Labels: guide monitor pingrequest pull-request-available reference solrj  
(was: guide monitor pingrequest reference solrj)

> Issue in SolrJ Reference Guide (Ping) - Incorrect Status Retrieval
> --
>
> Key: SOLR-17684
> URL: https://issues.apache.org/jira/browse/SOLR-17684
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: SolrJ
>Affects Versions: 9.8
>Reporter: Umut Saribiyik
>Priority: Minor
>  Labels: guide, monitor, pingrequest, pull-request-available, 
> reference, solrj
> Attachments: image-2025-02-26-13-29-31-289.png
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The SolrJ Reference Guide provides incorrect examples for retrieving the ping 
> status of a collection.
> [https://solr.apache.org/guide/solr/9_8/deployment-guide/ping.html] 
> *Issues:*
>  # pingResponse.getStatus() returns the status of the ping request itself 
> (status=0), not the collection's ping status ("OK").
>  # Since getResponse() returns a NamedList, the value must be 
> explicitly cast to a String or converted using .toString().
>  
>  
> *Correction:*
> The correct way to retrieve the collection's ping status:
> {code:java}
> String status = (String) process.getResponse().get("status");  
> String status = process.getResponse().get("status").toString();  
> {code}
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Updated] (SOLR-17043) Remove SolrClient path pattern matching

2025-03-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/SOLR-17043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SOLR-17043:
--
Labels: V2 pull-request-available  (was: V2)

> Remove SolrClient path pattern matching
> ---
>
> Key: SOLR-17043
> URL: https://issues.apache.org/jira/browse/SOLR-17043
> Project: Solr
>  Issue Type: Improvement
>  Components: SolrJ, v2 API
>Reporter: Jason Gerlowski
>Priority: Minor
>  Labels: V2, pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently, some SolrClient implementations (especially our "load-balancing" 
> and "cloud" clients) do pattern-matching on the path to guess the "type" 
> (admin, update, etc. ) of each request.  This seems unnecessary though, as 
> SolrRequest already has a "getRequestType" method exposing this.  We should 
> use this method where possible instead of the ad-hoc pattern matching we 
> currently do, which is brittle and doesn't map well to the varied paths used 
> by our v2 APIs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (SOLR-17684) Issue in SolrJ Reference Guide (Ping) - Incorrect Status Retrieval

2025-03-04 Thread Umut Saribiyik (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-17684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17932415#comment-17932415
 ] 

Umut Saribiyik commented on SOLR-17684:
---

[~epugh] Could you please review the PR?

> Issue in SolrJ Reference Guide (Ping) - Incorrect Status Retrieval
> --
>
> Key: SOLR-17684
> URL: https://issues.apache.org/jira/browse/SOLR-17684
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: SolrJ
>Affects Versions: 9.8
>Reporter: Umut Saribiyik
>Priority: Minor
>  Labels: guide, monitor, pingrequest, pull-request-available, 
> reference, solrj
> Attachments: image-2025-02-26-13-29-31-289.png
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The SolrJ Reference Guide provides incorrect examples for retrieving the ping 
> status of a collection.
> [https://solr.apache.org/guide/solr/9_8/deployment-guide/ping.html] 
> *Issues:*
>  # pingResponse.getStatus() returns the status of the ping request itself 
> (status=0), not the collection's ping status ("OK").
>  # Since getResponse() returns a NamedList, the value must be 
> explicitly cast to a String or converted using .toString().
>  
>  
> *Correction:*
> The correct way to retrieve the collection's ping status:
> {code:java}
> String status = (String) process.getResponse().get("status");  
> String status = process.getResponse().get("status").toString();  
> {code}
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



Re: [I] Security.json is never copied to Zookeeper while creating Solr 9.8.0 Clusters [solr-operator]

2025-03-04 Thread via GitHub


jdgiddings commented on issue #762:
URL: https://github.com/apache/solr-operator/issues/762#issuecomment-2698732535

   @janhoy I found a temporary solution. the `solr zk` command is not 
respecting the ZK_HOST environment variable. I created an init container 
identical to `setup-zk` but, I added --zk-host ${ZK_HOST} to all the `solr zk` 
commands. It works perfect! Here's the script:
   
   ```
   solr zk cp --zk-host ${ZK_HOST} zk:/security.json /tmp/current_security.json 
>/dev/null 2>&1; GET_CURRENT_SECURITY_JSON_EXIT_CODE=$?; if [ 
${GET_CURRENT_SECURITY_JSON_EXIT_CODE} -eq 0 ]; then if [ ! -s 
/tmp/current_security.json ] || grep -q '^{}$' /tmp/current_security.json ]; 
then echo $SECURITY_JSON > /tmp/security.json; solr zk cp --zk-host ${ZK_HOST} 
/tmp/security.json zk:/security.json >/dev/null 2>&1; echo 'Blank security.json 
found. Put new security.json in ZK'; fi; elif [ 
${GET_CURRENT_SECURITY_JSON_EXIT_CODE} -eq 1 ]; then echo $SECURITY_JSON > 
/tmp/security.json; solr zk cp --zk-host ${ZK_HOST} /tmp/security.json 
zk:/security.json >/dev/null 2>&1; echo 'No security.json found. Put new 
security.json in ZK'; fi
   ```


-- 
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



Re: [PR] SOLR-17684: SolrJ Reference Guide (Ping) - Incorrect Status Retrieval [solr]

2025-03-04 Thread via GitHub


epugh commented on PR #3237:
URL: https://github.com/apache/solr/pull/3237#issuecomment-2698731158

   This looks great, however, can we slim down the test by removing the 
TechProducts code?


-- 
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



Re: [I] Security.json is never copied to Zookeeper while creating Solr 9.8.0 Clusters [solr-operator]

2025-03-04 Thread via GitHub


jdgiddings commented on issue #762:
URL: https://github.com/apache/solr-operator/issues/762#issuecomment-2698656591

   Running the command `sh -c solr zk cp zk:/security.json 
/tmp/current_security.json`, the first command in the `setup-zk` script, in an 
identical init container returns:
   
   ```
   Neither --zk-host or --solr-url parameters provided so assuming solr url is 
http://localhost:8983.
   
   ERROR: Server refused connection at: 
http://localhost:8983/solr/admin/info/system
   ```


-- 
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



Re: [PR] SOLR-17684: SolrJ Reference Guide (Ping) - Incorrect Status Retrieval [solr]

2025-03-04 Thread via GitHub


epugh commented on code in PR #3237:
URL: https://github.com/apache/solr/pull/3237#discussion_r1980125917


##
solr/solr-ref-guide/modules/deployment-guide/examples/UsingPingRefGuideExamplesTest.java:
##
@@ -0,0 +1,128 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.solr.client.solrj.SolrClient;
+import org.apache.solr.client.solrj.beans.Field;
+import org.apache.solr.client.solrj.request.CollectionAdminRequest;
+import org.apache.solr.client.solrj.request.SolrPing;
+import org.apache.solr.client.solrj.response.CollectionAdminResponse;
+import org.apache.solr.client.solrj.response.SolrPingResponse;
+import org.apache.solr.cloud.SolrCloudTestCase;
+import org.apache.solr.util.ExternalPaths;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Example Ping usage.
+ *
+ * Snippets surrounded by "tag" and "end" comments are extracted and used 
in the Solr Reference
+ * Guide.
+ */
+public class UsingPingRefGuideExamplesTest extends SolrCloudTestCase {
+
+  private static final int NUM_LIVE_NODES = 1;
+
+  @BeforeClass
+  public static void setUpCluster() throws Exception {
+configureCluster(NUM_LIVE_NODES)
+.addConfig("conf", new 
File(ExternalPaths.TECHPRODUCTS_CONFIGSET).toPath())
+.configure();
+
+CollectionAdminResponse response =
+CollectionAdminRequest.createCollection("techproducts", "conf", 1, 1)
+.process(cluster.getSolrClient());
+cluster.waitForActiveCollection("techproducts", 1, 1);
+  }
+
+  @Before
+  @Override
+  public void setUp() throws Exception {
+super.setUp();
+final SolrClient client = getSolrClient();
+
+final List products = new ArrayList<>();
+products.add(new TechProduct("1", "Fitbit Alta"));
+products.add(new TechProduct("2", "Sony Walkman"));
+products.add(new TechProduct("3", "Garmin GPS"));
+
+client.addBeans("techproducts", products);
+client.commit("techproducts");
+  }
+
+  @After
+  @Override
+  public void tearDown() throws Exception {
+super.tearDown();
+
+final SolrClient client = getSolrClient();
+client.deleteByQuery("techproducts", "*:*");

Review Comment:
   like wise, if we don't create data etc, we probably don't need `tearDown`



##
solr/solr-ref-guide/modules/deployment-guide/examples/UsingPingRefGuideExamplesTest.java:
##
@@ -0,0 +1,128 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.solr.client.solrj.SolrClient;
+import org.apache.solr.client.solrj.beans.Field;
+import org.apache.solr.client.solrj.request.CollectionAdminRequest;
+import org.apache.solr.client.solrj.request.SolrPing;
+import org.apache.solr.client.solrj.response.CollectionAdminResponse;
+import org.apache.solr.client.solrj.response.SolrPingResponse;
+import org.apache.solr.cloud.SolrCloudTestCase;
+import org.apache.solr.util.ExternalPaths;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Example Ping usage.
+ *
+ * Snippets surrounded by "tag" and "end" comments are extracted and used 
in the Solr Reference
+ * Guide.
+ */
+public class UsingPingRefGuideExamplesTest extends SolrCloudTestCase {
+
+  private 

Re: [PR] SOLR-17683: Remove CurrencyField [solr]

2025-03-04 Thread via GitHub


epugh commented on PR #3212:
URL: https://github.com/apache/solr/pull/3212#issuecomment-2698741995

   I was kind of waiting for Crave to come back to test my PR, but if that 
doesn't happen in a few days will run test suite locally and then merge.


-- 
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



Re: [PR] SOLR-17684: SolrJ Reference Guide (Ping) - Incorrect Status Retrieval [solr]

2025-03-04 Thread via GitHub


epugh closed pull request #3237: SOLR-17684: SolrJ Reference Guide (Ping) - 
Incorrect Status Retrieval
URL: https://github.com/apache/solr/pull/3237


-- 
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



Re: [PR] SOLR-17638 Some CLI errors not logged when starting prometheus exporter [solr]

2025-03-04 Thread via GitHub


epugh commented on code in PR #3236:
URL: https://github.com/apache/solr/pull/3236#discussion_r1980146287


##
solr/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java:
##
@@ -148,7 +148,7 @@ public static void main(String[] args) {
 .argName("BASE_URL")
 .type(String.class)
 .desc(
-"Specify the Solr base URL when connecting to Solr in 
standalone mode. If omitted both the -b parameter and the -z parameter, connect 
to http://localhost:8983/solr. For example 'http://localhost:8983/solr'.")
+"Specify the Solr base URL when connecting to Solr in 
standalone mode. If omitted both the -s parameter and the -z parameter, connect 
to http://localhost:8983/solr. For example 'http://localhost:8983/solr'.")

Review Comment:
   do we actually need the `/solr`?  I know in the main SolrCLI we don't 
mention `/solr` becasue it can ALSO be `/api` depending on what end points you 
are hitting.  This may be a bit different!  Also, if you look at `bin/solr` 
we have some stuff to populate environment variables that are read by 
`CLIUtils.getDefaultSolrUrl()`..  `solr.tool.host` ..  I wonder if we should be 
reusing that here?   Though maybe that is really for another PR?   



##
solr/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java:
##
@@ -241,7 +241,7 @@ public static void main(String[] args) {
 .argName("ZK_HOST")
 .type(String.class)
 .desc(
-"Specify the ZooKeeper connection string when connecting to 
Solr in SolrCloud mode. If omitted both the -b parameter and the -z parameter, 
connect to http://localhost:8983/solr. For example 'localhost:2181/solr'.")
+"Specify the ZooKeeper connection string when connecting to 
Solr in SolrCloud mode. If omitted both the -s parameter and the -z parameter, 
connect to http://localhost:8983/solr. For example 'localhost:2181/solr'.")

Review Comment:
   One more though, we do have in `ToolBase.java` the `public OptionGroup 
getConnectionOptions` that defines these options...   Though to use that, maybe 
the SolrExporter would need to be a direct part of `SolrCLI`?



-- 
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



Re: [PR] SOLR-17635: unmarshalling Map to SimpleOrderedMap if key i of type St… [solr]

2025-03-04 Thread via GitHub


dsmiley commented on code in PR #3163:
URL: https://github.com/apache/solr/pull/3163#discussion_r1979525750


##
solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java:
##
@@ -124,6 +124,9 @@ public class JavaBinCodec implements PushWriter {
   private boolean alreadyUnmarshalled;
   protected boolean readStringAsCharSeq = false;
 
+  private boolean mapAsNamedList =
+  EnvUtils.getPropertyAsBool("solr.solrj.javabin.mapAsNamedList", true);

Review Comment:
   should have "read" in here, in the field & property



-- 
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



[jira] [Created] (SOLR-17690) Solr CLI tools like zk cp does not read ZK_HOST

2025-03-04 Thread Jira
Jan Høydahl created SOLR-17690:
--

 Summary: Solr CLI tools like zk cp does not read ZK_HOST
 Key: SOLR-17690
 URL: https://issues.apache.org/jira/browse/SOLR-17690
 Project: Solr
  Issue Type: Bug
  Components: cli, scripts and tools
Affects Versions: 9.8.0
Reporter: Jan Høydahl
Assignee: Jan Høydahl


As reported in solr operator issue 
[https://github.com/apache/solr-operator/issues/762] there is a regression in 
solr-operator 0.9 which uses  {{solr zk cp}} instead of {{{}zkCli.sh{}}}, so 
that when using a combo of operator 0.9 and Solr 9.8.0, the script will fail 
due to not picking up {{ZK_HOST}} env.var.

Older solr-operator used {{zkCli.sh}} which read the env.var but had other 
issues. Pre 9.8 versions of Solr parsed "solr zk cp" command in bash instead of 
Java and thus works.

The solution is to enable CLI tools to get ZK_HOST from environment if 
{{--zk-host}} is not passed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Updated] (SOLR-17690) Solr CLI tools like zk cp does not read ZK_HOST

2025-03-04 Thread Jira


 [ 
https://issues.apache.org/jira/browse/SOLR-17690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Høydahl updated SOLR-17690:
---
Fix Version/s: 9.8.1

> Solr CLI tools like zk cp does not read ZK_HOST
> ---
>
> Key: SOLR-17690
> URL: https://issues.apache.org/jira/browse/SOLR-17690
> Project: Solr
>  Issue Type: Bug
>  Components: cli, scripts and tools
>Affects Versions: 9.8.0
>Reporter: Jan Høydahl
>Assignee: Jan Høydahl
>Priority: Major
> Fix For: 9.8.1
>
>
> As reported in solr operator issue 
> [https://github.com/apache/solr-operator/issues/762] there is a regression in 
> solr-operator 0.9 which uses  {{solr zk cp}} instead of {{{}zkCli.sh{}}}, so 
> that when using a combo of operator 0.9 and Solr 9.8.0, the script will fail 
> due to not picking up {{ZK_HOST}} env.var.
> Older solr-operator used {{zkCli.sh}} which read the env.var but had other 
> issues. Pre 9.8 versions of Solr parsed "solr zk cp" command in bash instead 
> of Java and thus works.
> The solution is to enable CLI tools to get ZK_HOST from environment if 
> {{--zk-host}} is not passed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[PR] SOLR-17690 Make solr zk tools read ZK_HOST environment [solr]

2025-03-04 Thread via GitHub


janhoy opened a new pull request, #3240:
URL: https://github.com/apache/solr/pull/3240

   https://issues.apache.org/jira/browse/SOLR-17690
   
   Fix for https://github.com/apache/solr-operator/issues/762


-- 
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



[jira] [Updated] (SOLR-17690) Solr CLI tools like zk cp does not read ZK_HOST

2025-03-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/SOLR-17690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SOLR-17690:
--
Labels: pull-request-available  (was: )

> Solr CLI tools like zk cp does not read ZK_HOST
> ---
>
> Key: SOLR-17690
> URL: https://issues.apache.org/jira/browse/SOLR-17690
> Project: Solr
>  Issue Type: Bug
>  Components: cli, scripts and tools
>Affects Versions: 9.8.0
>Reporter: Jan Høydahl
>Assignee: Jan Høydahl
>Priority: Major
>  Labels: pull-request-available
> Fix For: 9.8.1
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> As reported in solr operator issue 
> [https://github.com/apache/solr-operator/issues/762] there is a regression in 
> solr-operator 0.9 which uses  {{solr zk cp}} instead of {{{}zkCli.sh{}}}, so 
> that when using a combo of operator 0.9 and Solr 9.8.0, the script will fail 
> due to not picking up {{ZK_HOST}} env.var.
> Older solr-operator used {{zkCli.sh}} which read the env.var but had other 
> issues. Pre 9.8 versions of Solr parsed "solr zk cp" command in bash instead 
> of Java and thus works.
> The solution is to enable CLI tools to get ZK_HOST from environment if 
> {{--zk-host}} is not passed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



Re: [PR] SimpleOrderedMap MapWriter constructor [solr]

2025-03-04 Thread via GitHub


dsmiley commented on code in PR #3235:
URL: https://github.com/apache/solr/pull/3235#discussion_r1980622308


##
solr/solrj/src/java/org/apache/solr/common/params/SolrParams.java:
##
@@ -69,18 +69,16 @@ public String get(String param, String def) {
 
   @Override
   public void writeMap(EntryWriter ew) throws IOException {
-// TODO don't call toNamedList; more efficiently implement here
-// note: multiple values, if present, are a String[] under 1 key
-toNamedList()
-.forEach(
-(k, v) -> {
-  if (v == null || "".equals(v)) return;
-  try {
-ew.put(k, v);
-  } catch (IOException e) {
-throw new RuntimeException("Error serializing", e);
-  }
-});
+for (Entry entry : this) {
+  String[] value = entry.getValue();
+  // if only one value, don't wrap in an array
+  if (value.length == 1) {
+assert value[0] != null;

Review Comment:
   As an `assert`, it communicates that it shouldn't happen and it somewhat 
enforces it (within tests, any way).  I could further add a comment to say 
"values should not be null" (above both conditions).  On the single-value side, 
this is just a cheap line.  Perhaps 90% of parameters have a single value.  I 
don't want to bother with an assert of every value in the list; the brevity & 
simplicity of that assert I kept is all I wanted.



-- 
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



Re: [PR] SOLR-17690 Make solr zk tools read ZK_HOST environment [solr]

2025-03-04 Thread via GitHub


janhoy commented on code in PR #3240:
URL: https://github.com/apache/solr/pull/3240#discussion_r1980521378


##
solr/core/src/test/org/apache/solr/cli/ZkSubcommandsTest.java:
##
@@ -507,9 +507,10 @@ public void testGetFile() throws Exception {
 Path file =
 tmpDir.resolve("solrtest-getfile-" + this.getClass().getName() + "-" + 
System.nanoTime());
 
+// Not setting --zk-host, will fall back to sysProp 'zkHost'
 String[] args =
 new String[] {
-  "cp", "-z", zkServer.getZkAddress(), "zk:" + getNode, 
file.toAbsolutePath().toString()
+  "cp", "zk:" + getNode, file.toAbsolutePath().toString()

Review Comment:
   Simple way of testing the fix. This test explicitly sets `zkHost` sysProp in 
setUp, so removing `-z` shuold cause a fallback. The test 
`ZkSubcommandsTest#testGetFile()` will thus fail until the fix is added.



-- 
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



Re: [I] Security.json is never copied to Zookeeper while creating Solr 9.8.0 Clusters [solr-operator]

2025-03-04 Thread via GitHub


janhoy commented on issue #762:
URL: https://github.com/apache/solr-operator/issues/762#issuecomment-2699447199

   Thanks for testing further. Turns out many CLI commands document that 
`ZK_HOST` can be used in place of `--zk-host`, but they never attempt to read 
the environment. What `CLIUtils#getZkHost` does instead is to fall back to 
connecting to Solr itself to query the system-info endpoint to get zkHost. 
   
   I believe this shuold be solved in Solr CLI so it respects `ZK_HOST` 
variable.


-- 
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