You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/05/26 20:05:07 UTC
[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #8768: Deprecate debug options and always use query options
Jackie-Jiang commented on code in PR #8768:
URL: https://github.com/apache/pinot/pull/8768#discussion_r883031144
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -1480,6 +1480,16 @@ private boolean forceLog(BrokerResponse brokerResponse, long totalTimeMs) {
@VisibleForTesting
static void setOptions(PinotQuery pinotQuery, long requestId, String query, JsonNode jsonRequest) {
Map<String, String> queryOptions = new HashMap<>();
+ if (jsonRequest.has(Broker.Request.DEBUG_OPTIONS)) {
+ Map<String, String> debugOptions = getOptionsFromJson(jsonRequest, Broker.Request.DEBUG_OPTIONS);
+ if (!debugOptions.isEmpty()) {
+ LOGGER.debug("Debug options are set to: {} for request {}: {}", debugOptions, requestId, query);
+ pinotQuery.setDebugOptions(debugOptions);
Review Comment:
We do need to set it here for backward compatibility because the server might have not been upgraded to the newer version and is still expecting the option from the debug options. I didn't annotate `PinotQuery.setDebugOptions()` because it is auto-generated thrift class. Let me add some comments here to remove this after releasing `0.11.0`
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org