dsmiley commented on code in PR #2741: URL: https://github.com/apache/solr/pull/2741#discussion_r1818184649
########## solr/modules/cross-dc/src/java/org/apache/solr/crossdc/update/processor/MirroringUpdateProcessor.java: ########## @@ -233,7 +223,9 @@ public void processDelete(final DeleteUpdateCommand cmd) throws IOException { boolean done = false; while (!done) { q.set(CursorMarkParams.CURSOR_MARK_PARAM, cursorMark); - QueryResponse rsp = client.query(collection, q); + var baseUrl = cmd.getReq().getCore().getCoreContainer().getZkController().getBaseUrl(); + var client = cmd.getReq().getCoreContainer().getDefaultHttpSolrClient(); + QueryResponse rsp = client.requestWithBaseUrl(baseUrl, c -> c.query(collection, q)); Review Comment: @HoustonPutman wouldn't it be cool if this could talk directly without HTTP? I suppose EmbeddedSolrServer might not be appropriate since it doesn't handle collection arguments. But the collection in this case appears to be the same collection as the present core, thus we could address this to the same core? ########## solr/core/src/java/org/apache/solr/filestore/DistribFileStore.java: ########## @@ -192,7 +192,7 @@ private boolean fetchFileFromNodeAndPersist(String fromNode) { try { GenericSolrRequest request = new GenericSolrRequest(GET, "/node/files" + getMetaPath()); request.setResponseParser(new InputStreamResponseParser(null)); - var response = solrClient.requestWithBaseUrl(baseUrl, client -> client.request(request)); + var response = solrClient.requestWithBaseUrl(baseUrl, request::process).getResponse(); Review Comment: ping @gerlowskija ########## 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: @iamsanjay you said at the meetup that this doesn't work sometimes. I'm not surprised but I'd like to hear more about specifically why it doesn't work for particular callers that we might like to use, such as here. -- 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