gianm commented on code in PR #18076:
URL: https://github.com/apache/druid/pull/18076#discussion_r2131992134


##########
docs/querying/query-context.md:
##########
@@ -66,7 +66,7 @@ See [SQL query context](sql-query-context.md) for other query 
context parameters
 |`debug`| `false` | Flag indicating whether to enable debugging outputs for 
the query. When set to false, no additional logs will be produced (logs 
produced will be entirely dependent on your logging level). When set to true, 
the following addition logs will be produced:<br />- Log the stack trace of the 
exception (if any) produced by the query |
 |`setProcessingThreadNames`|`true`| Whether processing thread names will be 
set to `queryType_dataSource_intervals` while processing a query. This aids in 
interpreting thread dumps, and is on by default. Query overhead can be reduced 
slightly by setting this to `false`. This has a tiny effect in most scenarios, 
but can be meaningful in high-QPS, low-per-segment-processing-time scenarios. |
 |`sqlPlannerBloat`|`1000`|Calcite parameter which controls whether to merge 
two Project operators when inlining expressions causes complexity to increase. 
Implemented as a workaround to exception `There are not enough rules to produce 
a node with desired properties: convention=DRUID, sort=[]` thrown after 
rejecting the merge of two projects.|
-|`cloneQueryMode`|`excludeClones`| Indicates whether clone Historicals should 
be queried by brokers. Clone servers are created by the `cloneServers` 
Coordinator dynamic configuration. Possible values are `excludeClones`, 
`includeClones` and `preferClones`. `excludeClones` means that clone 
Historicals are not queried by the broker. `preferClones` indicates that when 
given a choice between the clone Historical and the original Historical which 
is being cloned, the broker chooses the clones. Historicals which are not 
involved in the cloning process will still be queried. `includeClones` means 
that broker queries any Historical without regarding clone status. This 
parameter only affects native queries. MSQ does not query Historicals directly, 
and Dart will not respect this context parameter.|
+|`cloneQueryMode`|`excludeClones`| Indicates whether clone Historicals should 
be queried by brokers. Clone servers are created by the `cloneServers` 
Coordinator dynamic configuration. Possible values are `excludeClones`, 
`includeClones` and `preferClones`. `excludeClones` means that clone 
Historicals are not queried by the broker. `preferClones` indicates that when 
given a choice between the clone Historical and the original Historical which 
is being cloned, the broker chooses the clones. Historicals which are not 
involved in the cloning process will still be queried. `includeClones` means 
that broker queries any Historical without regarding clone status. This 
parameter only affects native queries and Dart. MSQ does not query Historicals 
directly.|

Review Comment:
   remove the mention of Dart from here; it's currently undocumented so it 
would be odd to mention it.



##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/DataServerQueryHandler.java:
##########
@@ -300,16 +295,17 @@ private List<DataServerRequestDescriptor> 
createNextPendingRequests(
       if 
(segmentLoadInfo.getSegment().toDescriptor().equals(segmentDescriptorWithFullInterval))
 {
         Set<DruidServerMetadata> servers = segmentLoadInfo.getServers()
                                                           .stream()
-                                                          
.filter(druidServerMetadata -> includeSegmentSource.getUsedServerTypes()
-                                                                               
                              .contains(druidServerMetadata.getType()))
+                                                          
.filter(druidServerMetadata -> SegmentSource.REALTIME.getUsedServerTypes()

Review Comment:
   To mirror the suggestion for `IndexerControllerContext`, consider moving 
this to a constant in `DartControllerContext`.



##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/util/MSQTaskQueryMakerUtils.java:
##########
@@ -100,7 +100,7 @@ public static void validateContextSortOrderColumnsExist(
    */
   public static void validateRealtimeReindex(QueryContext context, 
MSQDestination destination, Query<?> query)
   {
-    final SegmentSource segmentSources = 
MultiStageQueryContext.getSegmentSources(context);
+    final SegmentSource segmentSources = 
MultiStageQueryContext.getSegmentSources(context, SegmentSource.NONE);

Review Comment:
   `SegmentSource.NONE` is now hard-coded in two places, let's make it just 
one. You could do a `public static final SegmentSource DEFAULT_SEGMENT_SOURCE` 
in `IndexerControllerContext`, and reference that here.



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