Skip to content

Upgrade solr to 9.10.1 - #503

Merged
thomasegense merged 4 commits into
netarchivesuite:masterfrom
WEB-CHILD:upgrade-solr-to-9.10
Jun 25, 2026
Merged

Upgrade solr to 9.10.1#503
thomasegense merged 4 commits into
netarchivesuite:masterfrom
WEB-CHILD:upgrade-solr-to-9.10

Conversation

@VictorHarbo

@VictorHarbo VictorHarbo commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

This pull request updates Solr and Lucene dependencies and refactors how raw JSON responses are retrieved from Solr in the NetarchiveSolrClient class. The refactor replaces the previous use of NoOpResponseParser with a new method leveraging InputStreamResponseParser, as NoOpResponseParser is deprecated.

Dependency updates:

  • Updated Solr and Lucene dependencies in pom.xml to newer versions

Refactoring JSON response handling:

  • Replaced the use of NoOpResponseParser with InputStreamResponseParser, as the first one is deprecated

PLEASE HAVE A LOOK at the use of InputStreamResponseParser, as I am using the stream.readAllBytes() which is not good for large amounts of data, but I think these queries are only used for returning search results right?

I've tested in the following way:

  1. Run all tests
  2. Deployed locally
  3. Performed queries, filterQueries and exports

Ps. This has not been reviewed internally in the WEBCHILD team.

@VictorHarbo
VictorHarbo requested a review from thomasegense June 23, 2026 06:45
@VictorHarbo VictorHarbo self-assigned this Jun 23, 2026
@VictorHarbo VictorHarbo added dependencies Pull requests that update a dependency file backend labels Jun 23, 2026

@thomasegense thomasegense left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 bug that must be fixed, and try research if you do avoid hardcoded magic strings.

Press F5 after a search to try again and the get the error.
2026-06-24 07:23:23 [http-nio-8080-exec-13] ERROR dk.kb.netarchivesuite.solrwayback.service.SolrWaybackResourceWeb(SolrWaybackResourceWeb.java:676) - ServiceException(HTTP 500) in Service:
java.io.IOException: closed
at java.net.http/jdk.internal.net.http.ResponseSubscribers$HttpResponseInputStream.current(ResponseSubscribers.java:352)
at java.net.http/jdk.internal.net.http.ResponseSubscribers$HttpResponseInputStream.read(ResponseSubscribers.java:403)
at java.base/java.io.InputStream.readNBytes(InputStream.java:396)
at java.base/java.io.InputStream.readAllBytes(InputStream.java:333)
at dk.kb.netarchivesuite.solrwayback.solr.NetarchiveSolrClient.requestRawJson(NetarchiveSolrClient.java:1542)
at dk.kb.netarchivesuite.solrwayback.solr.NetarchiveSolrClient.searchJsonResponseOnlyFacets(NetarchiveSolrClient.java:1419)
at dk.kb.netarchivesuite.solrwayback.facade.Facade.proxySolrOnlyFacets(Facade.java:1132)

NamedList<Object> resp = solrServer.request(req);
String jsonResponse = resp.get("response").toString();
return jsonResponse;
int status = (int) resp.get("responseStatus");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is this not possible without hardcoded strings? Is there Constants defined somewhere?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The cause of the bug is somehow related to these new lines

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Found the constants and have resolved the bug.

@VictorHarbo

Copy link
Copy Markdown
Collaborator Author

Good catch @thomasegense! I will look into it!

@VictorHarbo
VictorHarbo requested a review from thomasegense June 24, 2026 12:26

@thomasegense thomasegense left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.
The custom made caching framework was quite a trap and had nothing to do with the suprisingly easy solr upgrade.
I am not that pleased with the caching/superclasses to solrclient, too complicated.

@thomasegense
thomasegense merged commit 11d4f82 into netarchivesuite:master Jun 25, 2026
3 checks passed
@VictorHarbo
VictorHarbo deleted the upgrade-solr-to-9.10 branch June 25, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants