Skip to content
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

SOLR-16503: Use Http2SolrClient in SolrClientCache, SchemaDesigner #2764

Merged
merged 7 commits into from
Feb 10, 2025

Conversation

iamsanjay
Copy link
Contributor

https://issues.apache.org/jira/browse/SOLR-16503

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute 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 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

getStoredSampleDocs: simplify
postDataToBlobStore: don't swallow exception
collectionApiEndpoint: unused
delete commented code
HttpGet httpGet = new HttpGet(uri);
var request = new GenericSolrRequest(SolrRequest.METHOD.GET, "/blob/" + configSet + "_sample");
request.setRequiresCollection(true);
request.setResponseParser(new InputStreamResponseParser("filestream"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I played with this method a bit, hoping to remove InputStream low level stuff but there seems to be something special about "filestream" so I left this aspect as is. Besides, the response handling is pretty concise nonetheless.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes here look DRAFT-y

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this one I commented because somewhere in the code they InputStreamResponseParser is being used and but didn't closed properly upon exception. I believe it was to create JsonTupleStream, need to check again. So to avoid the ObjectTracker error I commented it then. In the new commit, I uncomment it and pushed the changes. Now the TestSQLHandler should fail!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup failed!

./gradlew :solr:modules:sql:test --tests "org.apache.solr.handler.sql.TestSQLHandler" -Ptests.jvms=96 "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=A8C858120DC9821C -Ptests.timeoutSuite=600000! -Ptests.file.encoding=UTF-8

@dsmiley
Copy link
Contributor

dsmiley commented Dec 3, 2024

There is another problem I chased down. So I tried the schema designer locally from this branch just to see if it was working. It's not, yet not captured in a test failure (not good). The problem I encountered was a HTTP 400 for the .system collection, which is where the schema designer is storing stuff. This is a special collection that is auto-created in HttpSolrCall on the first POST to it. But the schema designer does a GET. I have some WIP to catch the exception on the GET. I'll get back to this later.

@epugh
Copy link
Contributor

epugh commented Dec 4, 2024

There is another problem I chased down.
Thanks for chasing this. I have some ideas on how to make schema designer more widely useful for after christmas to try, so I appreciate your making sure it's all in good shape!

@dsmiley
Copy link
Contributor

dsmiley commented Jan 18, 2025

I figured out why TestSQLHandler was failing and have a fix: https://issues.apache.org/jira/browse/SOLR-17629 Once that's merged, this PR here should be mergeable.

@dsmiley
Copy link
Contributor

dsmiley commented Jan 21, 2025

Just a reminder: The commit message here should highlight 2 things. SolrClientCache AND the schema designer using Jetty HttpClient (HTTP/2). The title of this PR points to just one.

@dsmiley dsmiley changed the title SolrClientCache switch to Http2SolrClient SOLR-16503: Use Http2SolrClient in SolrClientCache, SchemaDesigner Feb 10, 2025
@dsmiley dsmiley marked this pull request as ready for review February 10, 2025 05:35
@iamsanjay iamsanjay merged commit 1bb9b84 into apache:main Feb 10, 2025
2 of 3 checks passed
iamsanjay added a commit that referenced this pull request Feb 10, 2025
…2764)

---------
Co-authored-by: David Smiley <[email protected]>

(cherry picked from commit 1bb9b84)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants