gortiz commented on code in PR #19019:
URL: https://github.com/apache/pinot/pull/19019#discussion_r3636448202


##########
pinot-common/src/main/java/org/apache/pinot/common/response/BrokerResponse.java:
##########
@@ -456,4 +458,30 @@ default long getRealtimeTotalMemAllocatedBytes() {
   default String getMaterializedViewQueried() {
     return null;
   }
+
+  /// Returns generic, product-agnostic response metadata: a free-form 
string-to-[JsonNode] map that
+  /// any component can populate to surface non-fatal, informational notes 
about how the query was
+  /// handled (for example that it was executed with an alternate or degraded 
strategy). Values are
+  /// arbitrary JSON, so a note can be a scalar, an object, or an array. This 
is intentionally a
+  /// generic extension point: the core engine attaches no semantics to the 
keys or values, so
+  /// extensions can add their own entries without a dedicated typed field on 
this interface.
+  ///
+  /// This is distinct from [#getTraceInfo()] (per-server trace strings, only 
populated when tracing
+  /// is enabled) and from [#getExceptions()] (the error/warning list). The 
default is an empty,
+  /// unmodifiable map for implementations that do not support response 
metadata.
+  default Map<String, JsonNode> getResponseMetadata() {

Review Comment:
   Good catch — fixed. Marked the interface default `getResponseMetadata()` 
`@JsonIgnore` so it no longer registers `responseMetadata` as a known property 
on `BrokerResponseNative`. One wrinkle: keeping only `@JsonProperty` on the V2 
override was not enough — the interface `@JsonIgnore` is inherited onto the 
override and disabled V2 serialization, so I added `@JsonIgnore(false)` there 
to re-enable it. Also added a `BrokerResponseNative.fromJsonString` regression 
test that deserializes a non-empty `responseMetadata`.



-- 
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]

Reply via email to