You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Andres de la Peña (Jira)" <ji...@apache.org> on 2022/02/16 12:25:00 UTC
[jira] [Comment Edited] (CASSANDRA-17186) Guardrail for number of partition keys on IN queries
[ https://issues.apache.org/jira/browse/CASSANDRA-17186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17493203#comment-17493203 ]
Andres de la Peña edited comment on CASSANDRA-17186 at 2/16/22, 12:24 PM:
--------------------------------------------------------------------------
I think I run CI over the branch not rebased on top of CASSANDRA-17353. That's the ticket that introduced the abort/fail renaming.
Here is a new run of a squashed+rebased version of the patch, including [this trivial fix|https://github.com/apache/cassandra/pull/1442#discussion_r807878834]:
||Branch||CI||
|[adelapena:17186-trunk-review|https://github.com/adelapena/cassandra/commits/17186-trunk-review]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1299/workflows/c858b3ac-3d37-4049-a104-3944fd3ade2c] [j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1299/workflows/583cb738-00cc-4f29-ab9c-40461095645f]|
was (Author: adelapena):
I think I run CI over the branch not rebased on top of CASSANDRA-17353. That's the ticket that introduced the abort/fail renaming.
Here is a new run of a squashed+rebased version of the patch, including [this trivial fix|https://github.com/apache/cassandra/pull/1442#discussion_r807878834]:
||Branch||CI||
|[17186-trunk-review|https://github.com/adelapena/cassandra/commits/17186-trunk-review]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1299/workflows/c858b3ac-3d37-4049-a104-3944fd3ade2c] [j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1299/workflows/583cb738-00cc-4f29-ab9c-40461095645f]|
> Guardrail for number of partition keys on IN queries
> ----------------------------------------------------
>
> Key: CASSANDRA-17186
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17186
> Project: Cassandra
> Issue Type: New Feature
> Components: Feature/Guardrails
> Reporter: Andres de la Peña
> Assignee: Krishna Vadali
> Priority: Normal
> Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
> Time Spent: 3h 40m
> Remaining Estimate: 0h
>
> Add a guardrail for limiting the number of partitions restricted with an {{IN}} clause in a {{SELECT}} query, for example:
> {code:java}
> # Guardrail to warn or abort when querying with an IN restriction selecting
> # more partition keys than threshold.
> # The two thresholds default to -1 to disable.
> partition_keys_in_select:
> warn_threshold: -1
> abort_threshold: -1
> {code}
> +Additional information for newcomers:+
> * Add the configuration for the new guardrail on the number of partitions on IN queries in the guardrails section of cassandra.yaml.
> * Add a getPartitionKeysInSelect method in GuardrailsConfig returning a Threshold.Config object
> * Implement that method in GuardrailsOptions, which is the default yaml-based implementation of GuardrailsConfig
> * Add a Threshold guardrail named partitionKeysInSelect in Guardrails, using the previously created config
> * Define JMX-friendly getters and setters for the previously created config in GuardrailsMBean
> * Implement the JMX-friendly getters and setters in Guardrails
> * Now that we have the guardrail ready, it’s time to use it. We should search for a place to invoke the Guardrails.partitionKeysInSelect#guard method with the number of keys specified in select query. The SelectStatement#getSliceCommands methods look like good candidates for this.
> * Finally, add some tests for the new guardrail. Given that the new guardrail is a Threshold, our new test should probably extend ThresholdTester.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org