Re: [PR] SOLR-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub


Willdotwhite commented on PR #2712:
URL: https://github.com/apache/solr/pull/2712#issuecomment-2350932827

   > We can put a call out to the community for testing on Windows... 
@Willdotwhite would you be interested in taking this PR for a spin on Windows?
   
   I'd be happy to, although I'm away from my Windows machine until next 
weekend at the earliest I'm afraid! Is there any particular time pressure on 
this?


-- 
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-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub


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

   > > We can put a call out to the community for testing on Windows... 
@Willdotwhite would you be interested in taking this PR for a spin on Windows?
   > 
   > I'd be happy to, although I'm away from my Windows machine until next 
weekend at the earliest I'm afraid! Is there any particular time pressure on 
this?
   
   It's open source and volunteer driven ;-).   So any time is a great time!   
   
   I do appreciate you and @rahulgoswami stepping up to do the Windows 
verification work.  It makes me a lot more confident about being able to evolve 
the CLI.


-- 
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] Fix bugs in bin/solr in branch_9_7 [solr]

2024-09-14 Thread via GitHub


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


##
solr/core/src/java/org/apache/solr/cli/HealthcheckTool.java:
##
@@ -170,7 +172,15 @@ protected void runCloudTool(CloudSolrClient 
cloudSolrClient, CommandLine cli) th
   q = new SolrQuery("*:*");
   q.setRows(0);
   q.set(DISTRIB, "false");
-  try (var solrClientForCollection = SolrCLI.getSolrClient(coreUrl)) {
+
+  // SolrCLI.getSolrClient converts the coreUrl back into a root Solr 
url, but we need to
+  // talk to specific core so manually creating the client.

Review Comment:
   Hmm, would you say this is a bug, or is it well documented in the javadoc?



##
solr/packaging/test/test_healthcheck.bats:
##
@@ -29,8 +29,9 @@ teardown() {
 }
 
 @test "healthcheck on cloud solr" {
-  solr start -c -e films
-  run solr healthcheck -c films
+  solr start -c -e films -p ${SOLR_PORT}
+  run solr healthcheck -c films -zkhost localhost:${ZK_PORT} -V
   refute_output --partial 'error'

Review Comment:
   Did you say that the refute should be case insensitive? Is that even 
supported in BATS?



##
solr/core/src/java/org/apache/solr/cli/ToolBase.java:
##
@@ -34,18 +34,29 @@ protected ToolBase(PrintStream stdout) {
   }
 
   protected void echoIfVerbose(final String msg, CommandLine cli) {
-if (cli.hasOption(SolrCLI.OPTION_VERBOSE.getOpt())) {
+if (verbose) {
   echo(msg);
 }
   }
 
+  /**
+   * Is this tool being run in a verbose mode?
+   *
+   * @return verbose or not

Review Comment:
   Unnecessary `@return` doc as the method name clearly indicates what is 
returned? :)



##
solr/packaging/test/test_delete_collection.bats:
##
@@ -77,3 +77,15 @@ teardown() {
   solr delete -c "COLL_NAME" --delete-config false
   assert config_exists "COLL_NAME"
 }
+
+@test "ensure -p port parameter is supported" {
+
+  #solr start -c -p ${SOLR2_PORT}
+  #solr assert --started http://localhost:${SOLR2_PORT} --timeout 5000

Review Comment:
   Remove dead code



##
solr/packaging/test/test_create.bats:
##
@@ -34,8 +34,31 @@ teardown() {
   assert_output --partial "Created new core 'COLL_NAME'"
 }
 
+@test "create_core works" {
+  run solr start
+  run solr create_core -c COLL_NAME
+  assert_output --partial "Created new core 'COLL_NAME'"
+}
+
 @test "create for cloud mode" {
   run solr start -c
   run solr create -c COLL_NAME
   assert_output --partial "Created collection 'COLL_NAME'"
 }
+
+@test "ensure -p port parameter is supported" {
+  solr start -p ${SOLR2_PORT}
+  solr assert --not-started http://localhost:${SOLR_PORT} --timeout 5000
+  solr assert --started http://localhost:${SOLR2_PORT} --timeout 5000
+  
+  run solr create -c COLL_NAME -p ${SOLR2_PORT}
+  assert_output --partial "Created new core 'COLL_NAME'"
+}
+
+@test "ensure -V verbose parameter is supported" {
+  solr start 
+  solr assert --started http://localhost:${SOLR_PORT} --timeout 5000
+  
+  run solr create -c COLL_NAME -V
+  assert_output --partial "Created new core 'COLL_NAME'"

Review Comment:
   Should not this assert a string that is only printed in verbose mode?



-- 
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-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub


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


##
solr/core/src/java/org/apache/solr/cli/SolrProcessMgr.java:
##
@@ -0,0 +1,159 @@
+/*
+ * 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.
+ */
+package org.apache.solr.cli;
+
+import static 
org.apache.solr.servlet.SolrDispatchFilter.SOLR_INSTALL_DIR_ATTRIBUTE;
+
+import java.io.IOException;
+import java.lang.invoke.MethodHandles;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Optional;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.solr.common.util.EnvUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/** Class to interact with Solr OS processes */
+public class SolrProcessMgr {

Review Comment:
   Agree. Also perhaps it should not be manager at all, unless it perhaps grows 
in the future to also be able to kill processes? Listing / inspecting them only 
would perhaps qualify for a name like `RunningSolrProcesses`?



-- 
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-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub


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


##
solr/core/src/java/org/apache/solr/cli/StatusTool.java:
##
@@ -65,37 +74,119 @@ public String getName() {
   .desc("Wait up to the specified number of seconds to see Solr 
running.")
   .build();
 
+  public static final Option OPTION_PORT =
+  Option.builder("p")
+  .longOpt("port")
+  .argName("PORT")
+  .required(false)
+  .hasArg()
+  .desc("Port on localhost to check status for")
+  .build();
+
+  public static final Option OPTION_SHORT =
+  Option.builder()
+  .longOpt("short")
+  .argName("SHORT")
+  .required(false)
+  .desc("Short format. Prints one URL per line for running instances")
+  .build();
+
   @Override
   public List getOptions() {
-return List.of(
-// The solr-url option is not exposed to the end user, and is
-// created by the bin/solr script and passed into this command 
directly,
-// therefore we don't use the SolrCLI.OPTION_SOLRURL.
-Option.builder()
-.argName("URL")
-.longOpt("solr-url")
-.hasArg()
-.required(false)
-.desc("Property set by calling scripts, not meant for user 
configuration.")
-.build(),
-OPTION_MAXWAITSECS);
+return List.of(OPTION_SOLRURL, OPTION_MAXWAITSECS, OPTION_PORT, 
OPTION_SHORT);
   }
 
   @Override
   public void runImpl(CommandLine cli) throws Exception {
-// Override the default help behaviour to put out a customized message 
that only list user
-// settable Options.
-if ((cli.getOptions().length == 0 && cli.getArgs().length == 0)
-|| cli.hasOption("h")
-|| cli.hasOption("help")) {
-  final Options options = new Options();
-  options.addOption(OPTION_MAXWAITSECS);
-  new HelpFormatter().printHelp("status", options);
-  return;
+String solrUrl = cli.getOptionValue(OPTION_SOLRURL);

Review Comment:
   Probably not, as it has never been advertised to end users?



-- 
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-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub


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


##
solr/core/src/java/org/apache/solr/cli/StatusTool.java:
##
@@ -65,37 +74,119 @@ public String getName() {
   .desc("Wait up to the specified number of seconds to see Solr 
running.")
   .build();
 
+  public static final Option OPTION_PORT =
+  Option.builder("p")
+  .longOpt("port")
+  .argName("PORT")
+  .required(false)
+  .hasArg()
+  .desc("Port on localhost to check status for")
+  .build();
+
+  public static final Option OPTION_SHORT =
+  Option.builder()
+  .longOpt("short")
+  .argName("SHORT")
+  .required(false)
+  .desc("Short format. Prints one URL per line for running instances")
+  .build();
+
   @Override
   public List getOptions() {
-return List.of(
-// The solr-url option is not exposed to the end user, and is
-// created by the bin/solr script and passed into this command 
directly,
-// therefore we don't use the SolrCLI.OPTION_SOLRURL.
-Option.builder()
-.argName("URL")
-.longOpt("solr-url")
-.hasArg()
-.required(false)
-.desc("Property set by calling scripts, not meant for user 
configuration.")
-.build(),
-OPTION_MAXWAITSECS);
+return List.of(OPTION_SOLRURL, OPTION_MAXWAITSECS, OPTION_PORT, 
OPTION_SHORT);
   }
 
   @Override
   public void runImpl(CommandLine cli) throws Exception {
-// Override the default help behaviour to put out a customized message 
that only list user
-// settable Options.
-if ((cli.getOptions().length == 0 && cli.getArgs().length == 0)
-|| cli.hasOption("h")
-|| cli.hasOption("help")) {
-  final Options options = new Options();
-  options.addOption(OPTION_MAXWAITSECS);
-  new HelpFormatter().printHelp("status", options);
-  return;
+String solrUrl = cli.getOptionValue(OPTION_SOLRURL);
+Integer port =
+cli.hasOption(OPTION_PORT) ? 
Integer.parseInt(cli.getOptionValue(OPTION_PORT)) : null;
+boolean shortFormat = cli.hasOption(OPTION_SHORT);
+
+if (port != null && solrUrl != null) {
+  CLIO.err("Please provide either --port or --solr-url, not both");

Review Comment:
   Sure, can do. What is the benefit of throwing an exception over doing an 
`exit(1)`?



-- 
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-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub


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


##
solr/core/src/java/org/apache/solr/cli/SolrProcessMgr.java:
##
@@ -0,0 +1,159 @@
+/*
+ * 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.
+ */
+package org.apache.solr.cli;
+
+import static 
org.apache.solr.servlet.SolrDispatchFilter.SOLR_INSTALL_DIR_ATTRIBUTE;
+
+import java.io.IOException;
+import java.lang.invoke.MethodHandles;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Optional;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.solr.common.util.EnvUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/** Class to interact with Solr OS processes */
+public class SolrProcessMgr {

Review Comment:
   I think I'll go with `SolrProcessManager`...



-- 
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-17450 StatusTool with pure Java code [solr]

2024-09-14 Thread via GitHub


janhoy commented on PR #2712:
URL: https://github.com/apache/solr/pull/2712#issuecomment-2351044545

   I removed the RuntimePermission for `manageProcess` for runtime since I 
suspect it is only needed for tests, where we actually do spawn processes... 
Will revert that commit if the test fails...


-- 
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-17448: Audit usage of ExecutorService#submit in Solr codebase [solr]

2024-09-14 Thread via GitHub


AndreyBozhko commented on code in PR #2707:
URL: https://github.com/apache/solr/pull/2707#discussion_r1759847806


##
solr/core/src/java/org/apache/solr/cloud/ZkController.java:
##
@@ -729,14 +729,16 @@ public void preClose() {
 
 try {
   synchronized (collectionToTerms) {
-customThreadPool.submit(
-() -> 
collectionToTerms.values().parallelStream().forEach(ZkCollectionTerms::close));
+collectionToTerms
+.values()
+.forEach(zkCollectionTerms -> 
customThreadPool.execute(zkCollectionTerms::close));
   }
 
-  customThreadPool.submit(
-  () ->
-  replicateFromLeaders.values().parallelStream()
-  .forEach(ReplicateFromLeader::stopReplication));
+  replicateFromLeaders
+  .values()
+  .forEach(
+  replicateFromLeader ->
+  
customThreadPool.execute(replicateFromLeader::stopReplication));

Review Comment:
   That should be OK, - in the `finally` block below, the executor is shut 
down, so it will await all currently running tasks.



-- 
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-17448: Audit usage of ExecutorService#submit in Solr codebase [solr]

2024-09-14 Thread via GitHub


AndreyBozhko commented on code in PR #2707:
URL: https://github.com/apache/solr/pull/2707#discussion_r1759847952


##
solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java:
##
@@ -936,7 +936,7 @@ private void testNewSingleFileAfterSchemaAPI(boolean v2) 
throws Exception {
 String collectionName = "newcollection";
 String configsetName = "regular";
 String configsetSuffix = "testSinglePathNew-1-" + v2;
-createConfigSet(null, configsetName + configsetSuffix, null, 
cluster.getSolrClient(), "solr");
+uploadConfigSetWithAssertions(configsetName, configsetSuffix, "solr");

Review Comment:
   Good point @dsmiley  - my guess was wrong here.
   
   After looking into the test failure more, I realized the issue happens 
because the test adds a field to the schema. The schema modification triggers 
the ZkIndexSchemaReader$SchemaWatcher watch - but while the watch is running, 
the test may already finish and the test suite may start deleting configsets 
from ZK.
   
   I reverted the change to the test, and instead modified the SchemaWatcher 
code to gracefully handle such scenario.



-- 
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-13360) StringIndexOutOfBoundsException: String index out of range: -3

2024-09-14 Thread ASF GitHub Bot (Jira)


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

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

> StringIndexOutOfBoundsException: String index out of range: -3
> --
>
> Key: SOLR-13360
> URL: https://issues.apache.org/jira/browse/SOLR-13360
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 7.2.1
> Environment: Solr 7.2.1 - SAP Hybris 6.7.0.8
>Reporter: Ahmed Ghoneim
>Priority: Critical
>  Labels: pull-request-available
> Attachments: managed-schema, managed-schema, resources.json, 
> solr-config.zip
>
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> *{color:#ff}I cannot execute the following query:{color}*
> {noformat}
> http://localhost:8983/solr/master_Project_Product_flip/suggest?q=duotop&spellcheck.q=duotop&qt=/suggest&spellcheck.dictionary=de&spellcheck.collate=true{noformat}
> 4/1/2019, 1:16:07 PM ERROR true RequestHandlerBase 
> java.lang.StringIndexOutOfBoundsException: String index out of range: -3
> {code:java}
> java.lang.StringIndexOutOfBoundsException: String index out of range: -3
>   at 
> java.lang.AbstractStringBuilder.replace(AbstractStringBuilder.java:851)
>   at java.lang.StringBuilder.replace(StringBuilder.java:262)
>   at 
> org.apache.solr.spelling.SpellCheckCollator.getCollation(SpellCheckCollator.java:252)
>   at 
> org.apache.solr.spelling.SpellCheckCollator.collate(SpellCheckCollator.java:94)
>   at 
> org.apache.solr.handler.component.SpellCheckComponent.addCollationsToResponse(SpellCheckComponent.java:297)
>   at 
> org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:209)
>   at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295)
>   at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:177)
>   at org.apache.solr.core.SolrCore.execute(SolrCore.java:2503)
>   at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:710)
>   at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:516)
>   at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:382)
>   at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:326)
>   at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751)
>   at 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
>   at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>   at 
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
>   at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>   at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
>   at 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
>   at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>   at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
>   at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>   at 
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>   at 
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
>   at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>   at 
> org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
>   at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>   at org.eclipse.jetty.server.Server.handle(Server.java:534)
>   at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
>   at 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
>   at 
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
>   at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
>   at 
> org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:251)
>   at 
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
>   at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
>   at 
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>   at 
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
>   at 
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:

Re: [PR] SOLR-13360: Collation code fails with non-increasing token order [solr]

2024-09-14 Thread via GitHub


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

   This PR has had no activity for 60 days and is now labeled as stale.  Any 
new activity or converting it to draft 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.  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



[jira] [Commented] (SOLR-17449) bboxField subfield Error in atomic updating

2024-09-14 Thread David Smiley (Jira)


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

David Smiley commented on SOLR-17449:
-

Thanks for reporting the bug.  docValues isn't necessarily required; it depends 
on what your search requirements are.  If you are ranking (i.e. sorting) in 
some way, then it's required.  But merely filtering -- no.

It'd be helpful to give a basic example of what the atomic update looks like to 
induce the issue.  Then whoever looks into this further could write a test and 
eventually fix it hopefully.

> bboxField subfield Error in atomic updating
> ---
>
> Key: SOLR-17449
> URL: https://issues.apache.org/jira/browse/SOLR-17449
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: Schema and Analysis
>Affects Versions: main (10.0)
>Reporter: Seunghan Jung
>Priority: Minor
> Attachments: image-2024-09-13-17-45-17-161.png
>
>
> For fields of type `bboxField`, derived fields such as `minX`, `maxX`, 
> `minY`, `maxY`, etc., are added to the schema and indexed.
> However, this causes issues during atomic updates. During an atomic update, 
> when a new document is moved and indexed, the fields of type `bboxField` are 
> re-indexed with `minX`, `maxX`, `minY`, `maxY` just as they were initially. 
> Since the original document already contains these fields, they are indexed 
> again in the new document. However, because they are already indexed by the 
> `bbox` field, this results in duplicate indexing. If the `numberType` 
> attribute of the bbox field type has `docValues=true`, an error occurs due to 
> the docValues being written twice.
> Here is the error message for this case:
> {code:java}
> Caused by: java.lang.IllegalArgumentException: DocValuesField "bbox__maxX" 
> appears more than once in this document (only one value is allowed per field)
>         at 
> org.apache.lucene.index.NumericDocValuesWriter.addValue(NumericDocValuesWriter.java:53)
>  ~[?:?]
>         at 
> org.apache.lucene.index.IndexingChain.indexDocValue(IndexingChain.java:937) 
> ~[?:?]
>         at 
> org.apache.lucene.index.IndexingChain.processField(IndexingChain.java:723) 
> ~[?:?]
>         at 
> org.apache.lucene.index.IndexingChain.processDocument(IndexingChain.java:576) 
> ~[?:?]
>         at 
> org.apache.lucene.index.DocumentsWriterPerThread.updateDocuments(DocumentsWriterPerThread.java:242)
>  ~[?:?]
>         at 
> org.apache.lucene.index.DocumentsWriter.updateDocuments(DocumentsWriter.java:432)
>  ~[?:?]
>         at 
> org.apache.lucene.index.IndexWriter.updateDocuments(IndexWriter.java:1545) 
> ~[?:?]
>         at 
> org.apache.lucene.index.IndexWriter.updateDocuments(IndexWriter.java:1521) 
> ~[?:?]
>         at 
> org.apache.solr.update.DirectUpdateHandler2.updateDocOrDocValues(DirectUpdateHandler2.java:1062)
>  ~[?:?]
>         at 
> org.apache.solr.update.DirectUpdateHandler2.doNormalUpdate(DirectUpdateHandler2.java:421)
>  ~[?:?]
>         at 
> org.apache.solr.update.DirectUpdateHandler2.addDoc0(DirectUpdateHandler2.java:374)
>  ~[?:?]
>         at 
> org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:311)
>  ~[?:?]{code}
>  
> Of course, setting the docValues="false" for the field type used in 
> numberType resolves the issue.
> However, this is not explained in the[ Solr Reference 
> Guide|https://solr.apache.org/guide/solr/latest/query-guide/spatial-search.html#bboxfield].
>  Instead, the example schema shows docValues="true", which makes it seem like 
> this is how it should be configured.
> !image-2024-09-13-17-45-17-161.png|width=1037,height=233!



--
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] SOLR-17432: Allow OTel Java Agent [solr]

2024-09-14 Thread via GitHub


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

   When I run the agent, I provide an Otel properties file with: (an excerpt)
   ```
   otel.metrics.exporter=none
   otel.logs.exporter=none
   otel.instrumentation.common.default-enabled=false
   otel.instrumentation.opentelemetry-api.enabled=true
   otel.instrumentation.opentelemetry-instrumentation-annotations.enabled=true
   otel.instrumentation.aws-sdk.enabled=true
   otel.instrumentation.java-http-client.enabled=true
   ```
   Notice I disable auto-instrumentation by default and selectively enable the 
specific instrumentations useful to me.  This works with Solr's manual 
instrumentation of itself as well because of enabling "opentelemetry-api".  All 
this is documented quite well in Otel.
   
   I don't see how this PR would have unintentional changes on existing 
traces/spans since they are tested and the PR doesn't change them.  Any way, 
I'm happy to share a screenshot later.
   
   This PR misses documentation to let users know they don't have to enable the 
opentelemetry module just to use opentelemetry :-). (an aside -- nor do we tell 
users they don't have to have an HDFS cluster to make use of the HDFS 
Directory).  Also I'd like to somewhere document a tip on how to use tracing 
during development / debugging of a unit test.


-- 
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-17432: Allow OTel Java Agent [solr]

2024-09-14 Thread via GitHub


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

   I'm a little unhappy with keeping TracerConfigurator named this while having 
it return an OpenTelemetry.  Really; we're embracing OpenTelemetry here.  I 
would love to use OpenTelemetry for metrics eventually, to be honest.


-- 
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-6962: bin/solr stop/start/restart should complain about missing value for options that expect a value. [solr]

2024-09-14 Thread via GitHub


rahulgoswami commented on PR #2671:
URL: https://github.com/apache/solr/pull/2671#issuecomment-2351383279

   Opened PR https://github.com/epugh/solr/pull/10 against this branch
   
   currently below usage of -a in solr start doesn't raise any alert and starts 
solr successfully:
   
solr start -a -p 8983 -s 
"C:\Work\Git\ApacheSolr\solr\solr\packaging\build\dev\example\techproducts\solr"
   
   PR will make the behaviour consistent with Linux. 
   
   Also I have a different opinion on solr stop behavior. In the new 
implementation on Linux, solr stop -a would say "Jvm options are required when 
using the -a option!" . But truly what the user's intent is to stop all 
instances . 
   
   On Windows, the user gets a message "ERROR: Must specify the port when 
trying to stop Solr, or use --all to stop all running nodes on this host." 
which imo guides them better than the Linux implementation. For this reason I 
have retained this Windows message in my PR. Happy to make the change for Linux 
too, but would need your help for validation. :)


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