st-omarkhalid commented on code in PR #18602:
URL: https://github.com/apache/pinot/pull/18602#discussion_r3317945246


##########
pinot-common/src/test/java/org/apache/pinot/common/response/broker/BrokerResponseNativeTest.java:
##########
@@ -85,4 +87,43 @@ public void testMaterializedViewQueriedAbsentWhenNull()
     Assert.assertFalse(json.contains("materializedViewQueried"),
         "Null materializedViewQueried should be suppressed by 
@JsonInclude(NON_NULL)");
   }
+
+  @Test
+  public void testServerStatsRoundTrip()
+      throws IOException {
+    // BaseSingleStageBrokerRequestHandler#handleRequest copies the 
AsyncQueryResponse-format
+    // per-server stats string onto the response after scatter; downstream 
subscribers
+    // (onQueryCompletion hooks and JSON-API clients) read it back from here. 
Verify the field
+    // round-trips through Jackson serialization unchanged.
+    BrokerResponseNative expected = new BrokerResponseNative();
+    String stats =
+        
"Server=SubmitDelayMs,ResponseDelayMs,ResponseSize,DeserializationTimeMs,RequestSentDelayMs;"
+            + "pinot-server-0_O=0,1,7571,0,0;pinot-server-1_O=0,1,7574,0,0";
+    expected.setServerStats(stats);

Review Comment:
   This change is only adding it to the query logs though.



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