dsmiley commented on code in PR #2741: URL: https://github.com/apache/solr/pull/2741#discussion_r1849091157
########## solr/core/src/java/org/apache/solr/filestore/DistribFileStore.java: ########## @@ -180,23 +184,35 @@ private boolean fetchFileFromNodeAndPersist(String fromNode) { ByteBuffer metadata = null; Map<?, ?> m = null; + + InputStream is = null; + var solrClient = coreContainer.getDefaultHttpSolrClient(); + try { + GenericSolrRequest request = new GenericSolrRequest(GET, "/node/files" + getMetaPath()); + request.setResponseParser(new InputStreamResponseParser(null)); + var response = solrClient.requestWithBaseUrl(baseUrl, request::process).getResponse(); + is = (InputStream) response.get("stream"); metadata = - Utils.executeGET( - coreContainer.getUpdateShardHandler().getDefaultHttpClient(), - baseUrl + "/node/files" + getMetaPath(), - Utils.newBytesConsumer((int) MAX_PKG_SIZE)); + Utils.newBytesConsumer((int) MAX_PKG_SIZE).accept((InputStream) response.get("stream")); m = (Map<?, ?>) Utils.fromJSON(metadata.array(), metadata.arrayOffset(), metadata.limit()); Review Comment: I now understand that we must do this because we need the metadata in ByteBuffer form to persist it later, therefore we need the InputStream. -- 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-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org