suneet-s commented on code in PR #12833:
URL: https://github.com/apache/druid/pull/12833#discussion_r932658223


##########
processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryConfig.java:
##########
@@ -102,6 +107,9 @@
   // Max on-disk temporary storage, per-query; when exceeded, the query fails
   private long maxOnDiskStorage = 0L;
 
+  @JsonProperty
+  private long defaultOnDiskStorage = Integer.MAX_VALUE;

Review Comment:
   ```suggestion
     private long defaultOnDiskStorage = -1;
   ```
   
   Since technically `Integer.MAX_VALUE` seems like a legit config option since 
`defaultOnDiskStorage` is a long



##########
processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryConfig.java:
##########
@@ -368,6 +392,8 @@ public GroupByQueryConfig withOverrides(final GroupByQuery 
query)
         CTX_KEY_ENABLE_MULTI_VALUE_UNNESTING,
         isMultiValueUnnestingEnabled()
     );
+
+    logger.debug(newConfig.toString());

Review Comment:
   nit: remove or add something in the log message that explains what the debug 
message is
   
   ```suggestion
   ```



##########
processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryConfig.java:
##########
@@ -263,6 +271,19 @@ public long getMaxOnDiskStorage()
     return maxOnDiskStorage;
   }
 
+  /**
+   * Mirror maxOnDiskStorage if defaultOnDiskStorage's default is not 
overridden by cluster operator.
+   *
+   * This mirroring is done to maintain continuity in behavior between Druid 
versions. If an operator wants to use
+   * defaultOnDiskStorage, they have to explicitly override it.
+   *
+   * @return The working value for defaultOnDiskStorage
+   */
+  public long getDefaultOnDiskStorage()
+  {
+    return defaultOnDiskStorage == Integer.MAX_VALUE ? getMaxOnDiskStorage() : 
defaultOnDiskStorage;

Review Comment:
   ```suggestion
       return defaultOnDiskStorage < 0 ? getMaxOnDiskStorage() : 
defaultOnDiskStorage;
   ```



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