Copilot commented on code in PR #4123:
URL: https://github.com/apache/solr/pull/4123#discussion_r2782755198
##########
solr/core/src/java/org/apache/solr/response/ResponseWritersRegistry.java:
##########
@@ -55,6 +55,8 @@ private ResponseWritersRegistry() {
jsonWriter, // Alias for JSON
"xml",
new XMLResponseWriter(),
+ "raw",
+ new RawResponseWriter(),
PROMETHEUS_METRICS_WT,
Review Comment:
Registering a shared `new RawResponseWriter()` here means node/container
requests with `wt=raw` will now use `RawResponseWriter`’s internal fallback
writer on error paths or when no raw content is present. That fallback is
currently `new JSONResponseWriter()` (Noggit), while this registry’s "standard"
JSON writer is `JacksonJsonWriter`, so JSON output may become inconsistent vs
the prior behavior (which would have fallen back to the registry’s standard
writer). Consider wiring `RawResponseWriter`’s fallback/base writer to use the
same `JacksonJsonWriter` instance as "standard" for node-level requests (or
otherwise ensure consistent JSON output for exceptions).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]