Re: [PR] SOLR-16957: Test user managed cluster with a twist! [solr]

2024-04-23 Thread via GitHub


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

   This PR had no visible activity in the past 60 days, labeling it as stale. 
Any new activity will remove the stale label. To attract more reviewers, please 
tag someone 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



Re: [PR] SOLR-17248: Refactor ZK related SolrCli tools to separate SolrZkClient and CloudSolrClient instantiation/usage [solr]

2024-04-23 Thread via GitHub


laminelam commented on code in PR #2417:
URL: https://github.com/apache/solr/pull/2417#discussion_r1576965590


##
solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java:
##
@@ -69,6 +70,7 @@ public static void closeConn() {
   zkClient = null;
 }
 zkAddr = null;
+System.clearProperty("solr.solr.home");

Review Comment:
   Yeah I was hesitating on doing it this way but ended up following the 
existing "style".
   But I think we don't need this as we can rely on 
_SystemPropertiesRestoreRule_. 
   Will test and let you know.



-- 
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-14607) LTR Query, timeAllowed parameter causes a timeout exception with no result

2024-04-23 Thread Walter Underwood (Jira)


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

Walter Underwood commented on SOLR-14607:
-

We are seeing this in production at LexisNexis. Only a few times per day, but 
it is happening. We run with LTR, timeAllowed, and partialResults. This 
particular collection has 4 shards, though we have collections with far more 
than that.

> LTR Query, timeAllowed parameter causes a timeout exception with no result
> --
>
> Key: SOLR-14607
> URL: https://issues.apache.org/jira/browse/SOLR-14607
> Project: Solr
>  Issue Type: Improvement
>  Components: contrib - LTR
>Affects Versions: 9.0
>Reporter: Shiming Li
>Priority: Minor
> Attachments: SOLR-14607-poc.patch
>
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> When using the LTR, open timeAllowed parameter, LTR feature of query may call 
> 'ExitableFilterAtomicReader.CheckAndThrow' timeout checks.
> If a timeout occurs at this point, the exception ExitingReaderException is 
> thrown, Lead to null result.
> Exception information:
> {code:java}
>  The request took too long to iterate over terms. Timeout: timeoutAt: 
> 50321611131050 (System.nanoTime(): 50321639573838), 
> TermsEnum=org.apache.lucene.codecs.blocktree.SegmentTermsEnum@62eaeeaa
> {code}
>  
> Can hold this exception in the LTR, returning partial results rather than 
> null.
> This exception occurs in two places:
> 1. 'LTRScoringQuery.CreateWeight' or 'LTRScoringQuery.createWeightsParallel'. 
> Here is the loading stage, timeout directly end is acceptable.
> 2. 'ModelWeight.scorer'. This is a stage that evaluates each Doc and can 
> catch the exception, returns the computed document.
>  



--
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-17244 - initial cut at an orientation for prospective release managers [solr]

2024-04-23 Thread via GitHub


cpoerschke commented on code in PR #2415:
URL: https://github.com/apache/solr/pull/2415#discussion_r1576573994


##
dev-docs/releasing.adoc:
##
@@ -0,0 +1,53 @@
+
+= Releasing Solr
+:toc: left
+
+== Motiviated?

Review Comment:
   ```suggestion
   == Motivated?
   ```



##
dev-docs/releasing.adoc:
##
@@ -0,0 +1,53 @@
+
+= Releasing Solr
+:toc: left
+
+== Motiviated?
+So you're of the opinion that there are unreleased features or bugfixes 
commited to the solr repository that the world needs?
+Are you so convinced of this that you are willing to volunteer to make it 
happen?
+Good! This document tells you how to get started.
+
+== Step 0 - Become a committer
+To do a release you must become a 
https://community.apache.org/contributors/becomingacommitter.html[commiter] on 
the project. Additionally, if you are not on the PMC you will also need to take 
special steps, and you will need to partner with a PMC member for at least one 
step. See https://www.apache.org/legal/release-policy.html#upload-ci

Review Comment:
   ```suggestion
   To do a release you must become a 
https://community.apache.org/contributors/becomingacommitter.html[committer] on 
the project. Additionally, if you are not on the PMC you will also need to take 
special steps, and you will need to partner with a PMC member for at least one 
step. See https://www.apache.org/legal/release-policy.html#upload-ci
   ```



##
dev-docs/releasing.adoc:
##
@@ -0,0 +1,53 @@
+
+= Releasing Solr
+:toc: left
+
+== Motiviated?
+So you're of the opinion that there are unreleased features or bugfixes 
commited to the solr repository that the world needs?
+Are you so convinced of this that you are willing to volunteer to make it 
happen?
+Good! This document tells you how to get started.
+
+== Step 0 - Become a committer
+To do a release you must become a 
https://community.apache.org/contributors/becomingacommitter.html[commiter] on 
the project. Additionally, if you are not on the PMC you will also need to take 
special steps, and you will need to partner with a PMC member for at least one 
step. See https://www.apache.org/legal/release-policy.html#upload-ci
+
+== Step 1 - Run the release wizard!
+
+But wait, don't I need community approval? (you exclaim)
+
+Yes! But there are some details to take care of that don't require anyone's 
approval, and getting comfortable with the release wizard will make it smoother 
so you should run through the early sections of the release wizard first.
+
+=== Where to find the release wizard
+
+The release wizard is found in a checkout of solr at 
`dev-tools/scripts/releaseWizard.py`
+
+=== What working copy to use
+
+The release wizard is meant to be used from any working copy you like, with 
the expectation that you will check out the PARENT branch. The wizard will 
(eventually) guide you into creating a fresh, clean checkout, but you don't 
need that at the start.
+
+=== How to run the release wizard
+
+1. Make sure you have python 3.4+ installed (if a higher version becomes 
required, the wizard should complain and tell you what it is)
+2. Install dependencies with `pip3 install -r requirements.txt`, from the 
`dev-tools/scripts` folder.
+3. Run the command you see documented at `dev-tools/scripts/README.md` using 
`--dry-run` initially is fine.
+
+NOTE: `--dry-run` does still create `~/.solr_releases` and `~/.solrrc` files 
and record the release version you intend for future reference so one might say 
it's really better described as a "slightly damp" run :) it should however not 
execute other commands. (in theory)
+
+
+== Step 2 - Complete the first 2 checklists
+
+The release wizard is organized into checklists and the first two checklists 
are preparation/planning related, and are good to complete before proposing the 
release

Review Comment:
   ```suggestion
   The release wizard is organized into checklists and the first two checklists 
are preparation/planning related, and are good to complete before proposing the 
release.
   ```



##
dev-docs/releasing.adoc:
##
@@ -0,0 +1,53 @@
+
+= Releasing Solr
+:toc: left
+
+== Motiviated?
+So you're of the opinion that there are unreleased features or bugfixes 
commited to the solr repository that the world needs?

Review Comment:
   ```suggestion
   So you're of the opinion that there are unreleased features or bugfixes 
committed to the Solr repository that the world needs?
   ```



##
dev-docs/releasing.adoc:
##
@@ -0,0 +1,53 @@
+
+= Releasing Solr
+:toc: left
+
+== Motiviated?
+So you're of the opinion that there are unreleased features or bugfixes 
commited to the solr repository that the world needs?
+Are you so convinced of this that you are willing to volunteer to make it 
happen?
+Good! This document tells you how to get started.
+
+== Step 0 - Become a committer
+To do a release you must become a 
https://community.apache.org/contributors/becomingacommitter.html[commiter] on 

[jira] [Assigned] (SOLR-17248) Refactor ZK related SolrCli tools to separate SolrZkClient and CloudSolrClient instantiation/usage

2024-04-23 Thread Eric Pugh (Jira)


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

Eric Pugh reassigned SOLR-17248:


Assignee: Eric Pugh

> Refactor ZK related SolrCli tools to separate SolrZkClient and 
> CloudSolrClient instantiation/usage
> --
>
> Key: SOLR-17248
> URL: https://issues.apache.org/jira/browse/SOLR-17248
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Lamine
>Assignee: Eric Pugh
>Priority: Minor
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Many CLI tool-related classes currently duplicate SolrZkClient & 
> _CloudSolrClient_ instantiation, with the same code appearing 12 times across 
> 8 different classes. It would be beneficial to extract this instantiation and 
> reuse the code for easy maintainability
>  



--
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-17248: Refactor ZK related SolrCli tools to separate SolrZkClient and CloudSolrClient instantiation/usage [solr]

2024-04-23 Thread via GitHub


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


##
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java:
##
@@ -28,6 +28,7 @@
 import org.apache.solr.client.solrj.request.RequestWriter;
 import org.apache.solr.client.solrj.request.UpdateRequest;
 import org.apache.solr.common.SolrException;
+import org.apache.solr.common.cloud.SolrClassLoader;

Review Comment:
   Do we need any additional testing around this on the `CloudHttp2SolrClient`, 
`CloudLegacySolrClient`?   You suggested they are covered already, just wanted 
to confirm.



##
solr/solrj/src/java/org/apache/solr/client/solrj/impl/ClusterStateProvider.java:
##
@@ -25,20 +25,21 @@
 import org.apache.solr.common.SolrCloseable;
 import org.apache.solr.common.cloud.ClusterState;
 import org.apache.solr.common.cloud.DocCollection;
+import org.apache.solr.common.cloud.SolrClassLoader;
 import org.apache.solr.common.params.CollectionAdminParams;
 
 /** Provides cluster state from some source */
 public interface ClusterStateProvider extends SolrCloseable {
 
-  static ClusterStateProvider newZkClusterStateProvider(
-  Collection zkHosts, String zkChroot, boolean canUseZkACLs) {
+  static ClusterStateProvider newZkClusterStateProvider(Collection 
zkHosts, String zkChroot, boolean canUseZkACLs,
+  SolrClassLoader solrClassLoader) {
 // instantiate via reflection so that we don't depend on ZK
 try {
   var constructor =
   
Class.forName("org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider")
   .asSubclass(ClusterStateProvider.class)
-  .getConstructor(Collection.class, String.class, Boolean.TYPE);
-  return constructor.newInstance(zkHosts, zkChroot, canUseZkACLs);
+  .getConstructor(Collection.class, String.class, Boolean.TYPE, 
SolrClassLoader.class);
+  return constructor.newInstance(zkHosts, zkChroot, canUseZkACLs, 
solrClassLoader);

Review Comment:
   I wonder if a big of javadocs on this method would help expliain what the 
magic is and shy we are pssing in solrClassLoader?



##
solr/core/src/java/org/apache/solr/cli/SolrCLI.java:
##
@@ -607,6 +611,46 @@ public static String getZkHost(CommandLine cli) throws 
Exception {
 return zkHost;
   }
 
+  public static SolrZkClient getSolrZkClient(CommandLine cli) throws Exception 
{
+return getSolrZkClient(cli, getZkHost(cli));
+  }
+
+  public static SolrZkClient getSolrZkClient(CommandLine cli, String zkHost) 
throws Exception {
+if (zkHost == null) {
+  throw new IllegalStateException(
+  "Solr at "
+  + cli.getOptionValue("solrUrl")
+  + " is running in standalone server mode, this command can only 
be used when running in SolrCloud mode.\n");
+}
+return new SolrZkClient.Builder()
+.withUrl(zkHost)
+.withTimeout(SolrZkClientTimeout.DEFAULT_ZK_CLIENT_TIMEOUT, 
TimeUnit.MILLISECONDS)
+.withSolrClassLoader(getSolrResourceLoader())
+.build();
+  }
+
+  public static CloudHttp2SolrClient getCloudHttp2SolrClient(String zkHost) {
+return getCloudHttp2SolrClient(zkHost, null);
+  }
+
+  public static CloudHttp2SolrClient getCloudHttp2SolrClient(
+  String zkHost, Http2SolrClient.Builder builder) {
+return new CloudHttp2SolrClient.Builder(Collections.singletonList(zkHost), 
Optional.empty())
+.withSolrClassLoader(getSolrResourceLoader())
+.withInternalClientBuilder(builder)
+.build();
+  }
+
+  private static SolrResourceLoader getSolrResourceLoader() {
+String dir = System.getProperty("solr.solr.home");
+if (StrUtils.isNullOrEmpty(dir)) {
+  dir = System.getProperty("solr.install.dir");
+}
+final SolrResourceLoader loader = new SolrResourceLoader(Paths.get(dir));
+NodeConfig.initModules(loader, null);

Review Comment:
   This NodeConfig is kind of jarring to me..  I'm reading htorugh the code, it 
all makes sense the methods and then "hey, there is a Nodeconfig!  What the 
heck is a node config??!!"..   Maybe just some javadocs/docs on why we have 
this.   



##
solr/core/src/java/org/apache/solr/cli/ZkMvTool.java:
##
@@ -69,18 +67,8 @@ public String getName() {
   public void runImpl(CommandLine cli) throws Exception {
 SolrCLI.raiseLogLevelUnlessVerbose(cli);
 String zkHost = SolrCLI.getZkHost(cli);
-if (zkHost == null) {

Review Comment:
   we are losing this special case messaging, however I think I am totally fine 
with that ;-).  Since I want to get rid of standalone mode anyway.



##
solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java:
##
@@ -69,6 +70,7 @@ public static void closeConn() {
   zkClient = null;
 }
 zkAddr = null;
+System.clearProperty("solr.solr.home");

Review Comment:
   isn't there a new / better way of handling system properties in tests?  
@dsmiley ?  

[jira] [Commented] (SOLR-17250) Release wizard needs to set user/email for repo it checks out

2024-04-23 Thread Jira


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

Jan Høydahl commented on SOLR-17250:


Good point. We could of course assume , but better to prompt 
for wanted email in the first section along with asf-id settings etc.

> Release wizard needs to set user/email for repo it checks out
> -
>
> Key: SOLR-17250
> URL: https://issues.apache.org/jira/browse/SOLR-17250
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: release-scripts
>Reporter: Gus Heck
>Priority: Major
>
> The script seems to assume you will have a global user/email set but for 
> folks with many clients, and or are active on other (non Apache) open source 
> projects this is often unwise.
> The script should ask user/email and set them locally on the working copy it 
> checks out
>  



--
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-17249) Lack of clarity in branch protection instructions in releaseWizard

2024-04-23 Thread Jira


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

Jan Høydahl commented on SOLR-17249:


Thanks for catching this. That addition to the wizard was very recent, and you 
are the first RM to try it. You are right, that the .asf.yaml must be edited on 
main branch.

> Lack of clarity in branch protection instructions in releaseWizard
> --
>
> Key: SOLR-17249
> URL: https://issues.apache.org/jira/browse/SOLR-17249
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: release-scripts
>Reporter: Gus Heck
>Priority: Major
>
> Since the branch is already made for 9.6 that step in checklist 3 has to be 
> manually walked through (omitting the actual branch creation command). At the 
> end it indicates that the branch should be protected, but he branch_9x (and 
> 9_6) don't have a branch protection section in .asf.yml and I somewhat 
> suspect that it's the main branch one that needs to be edited, but that's 
> unclear from the instructions:
> {code:java}
> In our case we'll create branch_9_6.
> Also edit `.asf.yaml` to add the new branch under `protected_branches`.
> Run these commands to create a release branch
>   cd ~/.solr-releases/9.6.0/solr
>   git checkout branch_9x
>   git pull --ff-only
>   # This command should fail with exit code 2 to verify branch branch_9_6 
> does not already exist
>   git ls-remote --exit-code --heads origin branch_9_6
>   git checkout -b branch_9_6
>   git push --set-upstream origin branch_9_6
>   # Add the new branch branch_9_6 under `protected_branches` in `.asf.yaml`. 
> An editor will open.
>   /usr/bin/nano .asf.yaml
>   git add .asf.yaml && git commit -m "Add branch protection for branch_9_6" 
> && git push
> {code}
> Either this is simply not yet available in 9_x or... there's an undocumented 
> branch switch necessary here
> Compare
> [https://github.com/apache/solr/blob/main/.asf.yaml] 
> ([https://github.com/apache/solr/blob/3cc92cf7fecffe45c727f26fc299e1ab3d1b3f20/.asf.yaml)]
> vs
> [https://github.com/apache/solr/blob/branch_9_6/.asf.yaml] 
> ([https://github.com/apache/solr/blob/6a2294db8ec1f4ecf21ec0f5b9bb3430ce6825e6/.asf.yaml])
>  
> Not sure the solution or even 100% sure this is an actual problem because 
> I've got an exceptional case from the branch already existing... but I'm 
> filing this so it can be investigated.



--
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-17099: snitch does not return spurious tags [solr]

2024-04-23 Thread via GitHub


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


##
solr/solrj-zookeeper/src/test/org/apache/solr/client/solrj/impl/NodeValueFetcherTest.java:
##
@@ -0,0 +1,89 @@
+/*
+ * 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.client.solrj.impl;
+
+import java.util.Set;
+import 
org.apache.solr.client.solrj.impl.SolrClientNodeStateProvider.RemoteCallCtx;
+import org.apache.solr.client.solrj.request.CollectionAdminRequest;
+import org.apache.solr.client.solrj.response.CollectionAdminResponse;
+import org.apache.solr.cloud.SolrCloudTestCase;
+import org.apache.solr.embedded.JettySolrRunner;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class NodeValueFetcherTest extends SolrCloudTestCase {
+
+  private static final String COLLECTION =
+  NodeValueFetcherTest.class.getSimpleName() + "_collection";
+
+  private static int numShards;
+  private static int numReplicas;
+
+  @BeforeClass
+  public static void setupCluster() throws Exception {
+// Metrics should be enabled to get them with snitch
+System.setProperty("metricsEnabled", "true");
+
+numShards = random().nextInt(3) + 3;
+numReplicas = random().nextInt(2) + 2;
+int numNodes = random().nextInt(2) + 2;

Review Comment:
   It would be enough to vary between 2-3 nodes, instead of 2-4? (Goal: Faster 
tests)



##
solr/CHANGES.txt:
##
@@ -103,6 +103,7 @@ Optimizations
 
 * GITHUB#2217: Scale to 10K+ collections better in 
ZkStateReader.refreshCollectionsList (David Smiley)
 
+* SOLR-17099: snitch does not return spurious tags (Pierre Salagnac)

Review Comment:
   Can you author a more understandable CHANGES line?



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