-
Notifications
You must be signed in to change notification settings - Fork 743
SOLR-17804: re-create SolrClient if closed. #3411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
solr/cross-dc-manager/build.gradle
Outdated
@@ -32,6 +32,7 @@ dependencies { | |||
implementation libs.dropwizard.metrics.servlets | |||
implementation libs.eclipse.jetty.server | |||
implementation libs.eclipse.jetty.ee10.servlet | |||
implementation libs.google.guava |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need this anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the logs this looks ok to me. Have y'all tested this to make sure the handoff is smooth?
Also can we add some TODO comments that mention that we should be doing this in the client and not in the consumer eventually?
// refresh and check again | ||
existingClient = solrClientRef.get(); | ||
if (existingClient.getClusterStateProvider().isClosed()) { | ||
log.info("- re-creating Solr client because its CSP was closed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make more normal log messages without -
s and not abbreviating things like "CSP"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This applies to all added log lines.
https://issues.apache.org/jira/browse/SOLR-17804
Use a
Supplier<CloudSolrClient>
that automatically re-creates the client if itsClusterStateProvider
is closed. Unfortunately SolrClient doesn't implementSolrCloseable
.