Upgrade solr to 9.10.1 - #503
Conversation
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
It is this not possible without hardcoded strings? Is there Constants defined somewhere?
There was a problem hiding this comment.
The cause of the bug is somehow related to these new lines
There was a problem hiding this comment.
Found the constants and have resolved the bug.
|
Good catch @thomasegense! I will look into it! |
thomasegense
left a comment
There was a problem hiding this comment.
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.
This pull request updates Solr and Lucene dependencies and refactors how raw JSON responses are retrieved from Solr in the
NetarchiveSolrClientclass. The refactor replaces the previous use ofNoOpResponseParserwith a new method leveragingInputStreamResponseParser, as NoOpResponseParser is deprecated.Dependency updates:
pom.xmlto newer versionsRefactoring JSON response handling:
NoOpResponseParserwithInputStreamResponseParser, as the first one is deprecatedPLEASE 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:
Ps. This has not been reviewed internally in the WEBCHILD team.