You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "aruraghuwanshi (via GitHub)" <gi...@apache.org> on 2024/10/25 23:50:20 UTC

[PR] Datasource based exemption from deprioritization (druid)

aruraghuwanshi opened a new pull request, #17416:
URL: https://github.com/apache/druid/pull/17416

   ### Description
   
   As of today the logic to define high/low priority data sources is missing. There are situations where we want to deprioritize queries based on them breaking the time range threshold, but the same cluster might host some data sources that are higher in priority. For this reason, I've added another Optional json parameter `exemptDatasources`, which would host those high-priority datasources, which will skip the deprioritization logic entirely.
   
   Updated the class ThresholdBasedQueryPrioritizationStrategy.
   
   This PR has:
   
   - [ ] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] a release note entry in the PR description.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   


-- 
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@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Datasource based exemption from deprioritization (druid)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17416:
URL: https://github.com/apache/druid/pull/17416#issuecomment-2599406051

   This pull request has been marked as stale due to 60 days of inactivity.
   It will be closed in 4 weeks if no further activity occurs. If you think
   that's incorrect or this pull request should instead be reviewed, please simply
   write any comment. Even if closed, you can still revive the PR at any time or
   discuss it on the dev@druid.apache.org list.
   Thank you for your contributions.


-- 
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@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Datasource based exemption from deprioritization (druid)

Posted by "maytasm (via GitHub)" <gi...@apache.org>.
maytasm commented on PR #17416:
URL: https://github.com/apache/druid/pull/17416#issuecomment-2455982465

   Just my 2c,
   - If it's possible, having this as a dynamic config like Coordinator/OVerlord dynamic config would be useful. Often time we find that important query/datasouce was put into the low lane and we need to switch it back to high lane ASAP
   - An opposite of this would be useful to. Forcing datasource into low lane. Often time we find that bad/expensive query/datasouce starts coming in that, although not exceeding the threshold, is very very expensive CPU-wise (due to some query shape that was not captured in the current threshold settings) 


-- 
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@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Datasource based exemption from deprioritization (druid)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #17416: Datasource based exemption from deprioritization
URL: https://github.com/apache/druid/pull/17416


-- 
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@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Datasource based exemption from deprioritization (druid)

Posted by "cryptoe (via GitHub)" <gi...@apache.org>.
cryptoe commented on code in PR #17416:
URL: https://github.com/apache/druid/pull/17416#discussion_r1845883599


##########
server/src/main/java/org/apache/druid/server/scheduling/ThresholdBasedQueryPrioritizationStrategy.java:
##########
@@ -51,13 +53,15 @@ public class ThresholdBasedQueryPrioritizationStrategy implements QueryPrioritiz
   private final Optional<Duration> periodThreshold;
   private final Optional<Duration> durationThreshold;
   private final Optional<Duration> segmentRangeThreshold;
+  private final Set<String> exemptDatasources;
 
   @JsonCreator
   public ThresholdBasedQueryPrioritizationStrategy(
       @JsonProperty("periodThreshold") @Nullable String periodThresholdString,
       @JsonProperty("durationThreshold") @Nullable String durationThresholdString,
       @JsonProperty("segmentCountThreshold") @Nullable Integer segmentCountThreshold,
       @JsonProperty("segmentRangeThreshold") @Nullable String segmentRangeThresholdString,
+      @JsonProperty("exemptDatasources") @Nullable Set<String> exemptDatasources,

Review Comment:
   This might lead to more issues like one query hogging the cluster for the exempt data source and all your query lanning goes for a toss. Should we revert the logic, ie if an "lowPriorityDataSource" is hit, lower the priority always. That way the cluster can be saved against outages ? Its better to err on the side of caution no ?
   
   Since there is no clear answer here : 
   * What do other data bases do ?
   * What's your practical experience running this config in production. 
   



-- 
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@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Datasource based exemption from deprioritization (druid)

Posted by "cryptoe (via GitHub)" <gi...@apache.org>.
cryptoe commented on code in PR #17416:
URL: https://github.com/apache/druid/pull/17416#discussion_r1845883599


##########
server/src/main/java/org/apache/druid/server/scheduling/ThresholdBasedQueryPrioritizationStrategy.java:
##########
@@ -51,13 +53,15 @@ public class ThresholdBasedQueryPrioritizationStrategy implements QueryPrioritiz
   private final Optional<Duration> periodThreshold;
   private final Optional<Duration> durationThreshold;
   private final Optional<Duration> segmentRangeThreshold;
+  private final Set<String> exemptDatasources;
 
   @JsonCreator
   public ThresholdBasedQueryPrioritizationStrategy(
       @JsonProperty("periodThreshold") @Nullable String periodThresholdString,
       @JsonProperty("durationThreshold") @Nullable String durationThresholdString,
       @JsonProperty("segmentCountThreshold") @Nullable Integer segmentCountThreshold,
       @JsonProperty("segmentRangeThreshold") @Nullable String segmentRangeThresholdString,
+      @JsonProperty("exemptDatasources") @Nullable Set<String> exemptDatasources,

Review Comment:
   This might lead to more issues like one query hogging the cluster for the exempt data source and all your query lanning goes for a toss. Should we revert the logic, ie if an "lowPriorityDataSource" is hit, lower the priority always. That way the cluster can be saved against outages ? Its better to err on the side of caution no ?
   
   Since there is not clear answer here : 
   * What do other data bases do ?
   * What's your practical experience running this config in production. 
   



-- 
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@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Datasource based exemption from deprioritization (druid)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17416:
URL: https://github.com/apache/druid/pull/17416#issuecomment-2660561264

   This pull request/issue has been closed due to lack of activity. If you think that
   is incorrect, or the pull request requires review, you can revive the PR at any time.


-- 
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@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org