This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 391cdd04277 HttpShardHandler: Fix extension hook (#2661)
391cdd04277 is described below

commit 391cdd04277b83a010f1d33288f9bc344a7ba2d0
Author: David Smiley <[email protected]>
AuthorDate: Mon Aug 26 11:15:35 2024 -0400

    HttpShardHandler: Fix extension hook (#2661)
    
    HttpShardHandler.transformResponse is an extension hook for subclasses to 
transform the shard response. Ever since 9.0 when the HTTP2 Async stuff landed, 
this hook became inoperable/dormant (method existed but hasn't been called 
anymore). This brings it back.
    
    Co-authored-by: Gilles Bellaton <[email protected]>
---
 .../src/java/org/apache/solr/handler/component/HttpShardHandler.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java 
b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java
index 1e315f8754f..56004d564aa 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java
@@ -168,7 +168,7 @@ public class HttpShardHandler extends ShardHandler {
             srsp.setShardAddress(rsp.getServer());
             ssr.elapsedTime =
                 TimeUnit.MILLISECONDS.convert(System.nanoTime() - startTime, 
TimeUnit.NANOSECONDS);
-            responses.add(srsp);
+            responses.add(transfomResponse(sreq, srsp, shard));
           } else if (throwable != null) {
             ssr.elapsedTime =
                 TimeUnit.MILLISECONDS.convert(System.nanoTime() - startTime, 
TimeUnit.NANOSECONDS);
@@ -176,7 +176,7 @@ public class HttpShardHandler extends ShardHandler {
             if (throwable instanceof SolrException) {
               srsp.setResponseCode(((SolrException) throwable).code());
             }
-            responses.add(srsp);
+            responses.add(transfomResponse(sreq, srsp, shard));
           }
         });
 

Reply via email to