You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/12/22 23:42:31 UTC
[GitHub] [solr] epugh opened a new pull request, #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
epugh opened a new pull request, #1248:
URL: https://github.com/apache/solr/pull/1248
https://issues.apache.org/jira/browse/SOLR-10470
# Description
setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
# Solution
Please provide a short description of the approach taken to implement your solution.
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on a diff in pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
epugh commented on code in PR #1248:
URL: https://github.com/apache/solr/pull/1248#discussion_r1057979692
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java:
##########
@@ -97,6 +97,7 @@ protected CloudHttp2SolrClient(Builder builder) {
} else {
this.stateProvider = builder.stateProvider;
}
+ this.setParallelCacheRefreshesLocks(builder.parallelCacheRefreshesLocks);
Review Comment:
yeah, what @stillalex said is why I added this extra method..... However, if it's an expert setting system property, then we could remove all of this right?
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh merged pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
epugh merged PR #1248:
URL: https://github.com/apache/solr/pull/1248
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
epugh commented on PR #1248:
URL: https://github.com/apache/solr/pull/1248#issuecomment-1364109540
So... I can't get a clean run of tests on any branch of solr on my laptop....
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] stillalex commented on a diff in pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
stillalex commented on code in PR #1248:
URL: https://github.com/apache/solr/pull/1248#discussion_r1056978713
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java:
##########
@@ -134,6 +135,7 @@ protected boolean wasCommError(Throwable rootCause) {
/** Constructs {@link CloudHttp2SolrClient} instances from provided configuration. */
public static class Builder {
+ public int parallelCacheRefreshesLocks = 3;
Review Comment:
+1 to all of the above
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
epugh commented on PR #1248:
URL: https://github.com/apache/solr/pull/1248#issuecomment-1366267147
I think I've responded to everythign from @dsmiley and @stillalex.. Only change I haven't made is to eliminate this property and replace it with a system variable... That feels like a bit more work, cause then I have to add more docs to ref guide etc... I can live iwth just moving it.... Thoughts? Should we not move forward with this PR and just add the system propertly?
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] stillalex commented on a diff in pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
stillalex commented on code in PR #1248:
URL: https://github.com/apache/solr/pull/1248#discussion_r1056978513
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java:
##########
@@ -97,6 +97,7 @@ protected CloudHttp2SolrClient(Builder builder) {
} else {
this.stateProvider = builder.stateProvider;
}
+ this.setParallelCacheRefreshesLocks(builder.parallelCacheRefreshesLocks);
Review Comment:
there are things happening in that setter (more that just a field update), so this might not be so bad
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] dsmiley commented on pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
dsmiley commented on PR #1248:
URL: https://github.com/apache/solr/pull/1248#issuecomment-1366923901
I don't think we need to document expert/advanced things in the reference guide _like this_. I'm not saying there shouldn't be any such there, only that we should not be compelled to.
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] dsmiley commented on a diff in pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
dsmiley commented on code in PR #1248:
URL: https://github.com/apache/solr/pull/1248#discussion_r1059533965
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java:
##########
@@ -1222,11 +1222,22 @@ public boolean isDirectUpdatesToLeadersOnly() {
/**
* If caches are expired they are refreshed after acquiring a lock. use this to set the number of
* locks
+ *
+ * @deprecated use {@link CloudHttp2SolrClient.Builder#setParallelCacheRefreshes(int)} instead
*/
+ @Deprecated
public void setParallelCacheRefreshes(int n) {
locks = objectList(n);
}
+ /**
+ * If caches are expired they are refreshed after acquiring a lock. This method sets the number of
+ * locks. It is used by the Builder only.
+ */
+ void setParallelCacheRefreshesLocks(int parallelCacheRefreshesLocks) {
+ locks = objectList(parallelCacheRefreshesLocks);
+ }
+
Review Comment:
> I think I would prefer having a method that takes an 'int' and hides away the implementation.
That exists in this PR -- `Builder.setParallelCacheRefreshes`. This makes the method I'm commenting on,
`Builder.setParallelCacheRefreshesLocks` more dubious as to if it's needed/useful.
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
epugh commented on PR #1248:
URL: https://github.com/apache/solr/pull/1248#issuecomment-1367285064
> > left a few minor comments, overall this looks good.
> > is updating the `objectList` method on the table? I find this code a bit ugly (bigger change would be to use an array everywhere, list is not doing any favors. smaller change would be to at least return List instead of ArrayList)
>
> There are a lot of places where some clean up would be nice. I think we should add a new JIRA for these clean ups. I think it's an opportunity to see if there are any otehr java cleanups that could be done.
@stillalex I created https://issues.apache.org/jira/browse/SOLR-16600 to track your idea, love a 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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on a diff in pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
epugh commented on code in PR #1248:
URL: https://github.com/apache/solr/pull/1248#discussion_r1057981674
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java:
##########
@@ -134,6 +135,7 @@ protected boolean wasCommError(Throwable rootCause) {
/** Constructs {@link CloudHttp2SolrClient} instances from provided configuration. */
public static class Builder {
+ public int parallelCacheRefreshesLocks = 3;
Review Comment:
Good stuff!
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] stillalex commented on pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
stillalex commented on PR #1248:
URL: https://github.com/apache/solr/pull/1248#issuecomment-1366757868
I agree eliminating the property is more work. I don't have a preference here. I would add the system property support (left a comment at the relevant line) and not remove builder support yet. basically allow both options, just my 2 cents.
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] stillalex commented on a diff in pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
stillalex commented on code in PR #1248:
URL: https://github.com/apache/solr/pull/1248#discussion_r1058444341
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java:
##########
@@ -147,6 +148,7 @@ public static class Builder {
private ResponseParser responseParser;
private long retryExpiryTime =
TimeUnit.NANOSECONDS.convert(3, TimeUnit.SECONDS); // 3 seconds or 3 million nanos
+ private int parallelCacheRefreshesLocks = 3;
Review Comment:
what about
```
private int parallelCacheRefreshesLocks = Integer.getInteger("solr.cloudSolrClient.parallelCacheRefreshLocks", 3);
```
this will allow setting via the system property and also builder
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
epugh commented on PR #1248:
URL: https://github.com/apache/solr/pull/1248#issuecomment-1367286764
I just fixed the lint problem. While it would be good to think about what properties should be settable and which should be system properties, I actually am thinking that is out of scope. I'd rather do that as a seperate PR, and where we think about ALL the properties and if they are system property settable.. (I also want to get Solr to a better way of handling property setting globablly anyway... ). So if you'all can live with it, I'd like to merge this as is.... @stillalex I added a JIRA for the simplification idea you had...
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] stillalex commented on a diff in pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
stillalex commented on code in PR #1248:
URL: https://github.com/apache/solr/pull/1248#discussion_r1056980257
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java:
##########
@@ -1222,11 +1222,22 @@ public boolean isDirectUpdatesToLeadersOnly() {
/**
* If caches are expired they are refreshed after acquiring a lock. use this to set the number of
* locks
+ *
+ * @deprecated use {@link CloudHttp2SolrClient.Builder#setParallelCacheRefreshes(int)} instead
*/
+ @Deprecated
public void setParallelCacheRefreshes(int n) {
locks = objectList(n);
}
+ /**
+ * If caches are expired they are refreshed after acquiring a lock. This method sets the number of
+ * locks. It is used by the Builder only.
+ */
+ void setParallelCacheRefreshesLocks(int parallelCacheRefreshesLocks) {
+ locks = objectList(parallelCacheRefreshesLocks);
+ }
+
Review Comment:
was looking for a place to put this observation, so I'll leave it here. I think I would prefer having a method that takes an 'int' and hides away the implementation. this would allow in the future for replacing this cache striping with another cache that also allows for setting the stripe size without breaking any clients that rely on this (if ever).
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
epugh commented on PR #1248:
URL: https://github.com/apache/solr/pull/1248#issuecomment-1363888032
So, with these changes, a lot of tests fail... For example "DistributedExpandComponentTest"
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on a diff in pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
epugh commented on code in PR #1248:
URL: https://github.com/apache/solr/pull/1248#discussion_r1057980637
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java:
##########
@@ -126,7 +126,7 @@ public abstract class CloudSolrClient extends SolrClient {
}
- private volatile List<Object> locks = objectList(3);
+ protected volatile List<Object> locks = objectList(3);
Review Comment:
nice catch!
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] stillalex commented on a diff in pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
stillalex commented on code in PR #1248:
URL: https://github.com/apache/solr/pull/1248#discussion_r1056979156
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java:
##########
@@ -126,7 +126,7 @@ public abstract class CloudSolrClient extends SolrClient {
}
- private volatile List<Object> locks = objectList(3);
+ protected volatile List<Object> locks = objectList(3);
Review Comment:
I think this could remain private?
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] stillalex commented on pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
stillalex commented on PR #1248:
URL: https://github.com/apache/solr/pull/1248#issuecomment-1364712912
left a few minor comments, overall this looks good.
is updating the `objectList` method on the table? I find this code a bit ugly (bigger change would be to use an array everywhere, list is not doing any favors. smaller change would be to at least return List instead of ArrayList)
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
epugh commented on PR #1248:
URL: https://github.com/apache/solr/pull/1248#issuecomment-1368218658
thanks for the comments folks. Running a full test, and waiting for the jenkins main branch to finish, and then will merge 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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] stillalex commented on pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
stillalex commented on PR #1248:
URL: https://github.com/apache/solr/pull/1248#issuecomment-1368118096
looks good to me, will leave @dsmiley to add any concerns if any.
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
epugh commented on PR #1248:
URL: https://github.com/apache/solr/pull/1248#issuecomment-1367889316
Okay, any angst to me merging 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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] stillalex commented on a diff in pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
stillalex commented on code in PR #1248:
URL: https://github.com/apache/solr/pull/1248#discussion_r1056978470
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java:
##########
@@ -249,6 +251,17 @@ public Builder withParallelUpdates(boolean parallelUpdates) {
return this;
}
+ /**
+ * Tells {@link CloudHttp2SolrClient.Builder} if caches are expired then they are refreshed
Review Comment:
what about adding something more meaningful regarding what the number represents? this is about lock striping so maybe reflect this into the javadoc? like
`Controls the number of cache lock stripes used by the client when refreshing the cache.
`
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
epugh commented on PR #1248:
URL: https://github.com/apache/solr/pull/1248#issuecomment-1366263569
> left a few minor comments, overall this looks good.
>
> is updating the `objectList` method on the table? I find this code a bit ugly (bigger change would be to use an array everywhere, list is not doing any favors. smaller change would be to at least return List instead of ArrayList)
There are a lot of places where some clean up would be nice. I think we should add a new JIRA for these clean ups. I think it's an opportunity to see if there are any otehr java cleanups that could be done.
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
epugh commented on PR #1248:
URL: https://github.com/apache/solr/pull/1248#issuecomment-1364110212
So, `setParallelCacheRefreshes` appears to be a odd setting.... Does anyone actually change it/use it? Or do we all just use the default of 3? There don't appear to be any tests for it.... Thoughts on eliminating it?
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] dsmiley commented on a diff in pull request #1248: SOLR-10470: setParallelCacheRefreshes should be deprecated in favor of SolrClientBuilder methods
Posted by GitBox <gi...@apache.org>.
dsmiley commented on code in PR #1248:
URL: https://github.com/apache/solr/pull/1248#discussion_r1056534772
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java:
##########
@@ -1222,11 +1222,22 @@ public boolean isDirectUpdatesToLeadersOnly() {
/**
* If caches are expired they are refreshed after acquiring a lock. use this to set the number of
* locks
+ *
+ * @deprecated use {@link CloudHttp2SolrClient.Builder#setParallelCacheRefreshes(int)} instead
*/
+ @Deprecated
public void setParallelCacheRefreshes(int n) {
locks = objectList(n);
}
+ /**
+ * If caches are expired they are refreshed after acquiring a lock. This method sets the number of
+ * locks. It is used by the Builder only.
+ */
+ void setParallelCacheRefreshesLocks(int parallelCacheRefreshesLocks) {
+ locks = objectList(parallelCacheRefreshesLocks);
+ }
+
Review Comment:
I don't see this used by the builder, I see it used by the constructor. I think we don't need this method; it could be inline'ed.
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java:
##########
@@ -134,6 +135,7 @@ protected boolean wasCommError(Throwable rootCause) {
/** Constructs {@link CloudHttp2SolrClient} instances from provided configuration. */
public static class Builder {
+ public int parallelCacheRefreshesLocks = 3;
Review Comment:
not protected like the rest?
Furthermore, even though field order doesn't truly matter, I would put an obscure setting like this last, not first. First ones should be most central/important.
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java:
##########
@@ -97,6 +97,7 @@ protected CloudHttp2SolrClient(Builder builder) {
} else {
this.stateProvider = builder.stateProvider;
}
+ this.setParallelCacheRefreshesLocks(builder.parallelCacheRefreshesLocks);
Review Comment:
Instead of using a deprecated setter, just set the field directly. Notice the rest of this method sets fields directly.
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java:
##########
@@ -249,6 +251,17 @@ public Builder withParallelUpdates(boolean parallelUpdates) {
return this;
}
+ /**
+ * Tells {@link CloudHttp2SolrClient.Builder} if caches are expired then they are refreshed
Review Comment:
```suggestion
* When caches are expired then they are refreshed
```
"Tells XXX-Builder" seems like useless words
--
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-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org