Skip to content

Commit

Permalink
HttpShardHandler: Fix extension hook (apache#2661)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dsmiley and gbellaton authored Aug 26, 2024
1 parent ed36fdb commit 391cdd0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ public void submit(
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);
srsp.setException(throwable);
if (throwable instanceof SolrException) {
srsp.setResponseCode(((SolrException) throwable).code());
}
responses.add(srsp);
responses.add(transfomResponse(sreq, srsp, shard));
}
});

Expand Down

0 comments on commit 391cdd0

Please sign in to comment.