[ https://issues.apache.org/jira/browse/CASSANDRA-17186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17498986#comment-17498986 ]
Josh McKenzie commented on CASSANDRA-17186: ------------------------------------------- Looks like a rough run of CI on ASF infra; cdc job had some troubles. Doubt it's related to this ticket. [CI Results] Branch: trunk, build number: 971 jenkins url: [https://ci-cassandra.apache.org/job/Cassandra-trunk/971/] JIRA: CASSANDRA-17186 commit url: [https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=commit;h=7ea0a4aa410e9d0d252115607ac5c31d37784357] affected paths: * src/java/org/apache/cassandra/db/guardrails/GuardrailsConfig.java * test/unit/org/apache/cassandra/db/guardrails/GuardrailPartitionKeysInSelectTest.java * conf/cassandra.yaml * src/java/org/apache/cassandra/cql3/statements/SelectStatement.java * src/java/org/apache/cassandra/db/guardrails/GuardrailsMBean.java * src/java/org/apache/cassandra/db/guardrails/Guardrails.java * CHANGES.txt * src/java/org/apache/cassandra/config/Config.java * src/java/org/apache/cassandra/config/GuardrailsOptions.java Build Result: UNSTABLE Passing Tests: 45296 Failing Tests: 12 ||Test|Failures|JIRA| |dtest-upgrade.upgrade_tests.upgrade_through_versions_test.TestProtoV3Upgrade_AllVersions_EndsAt_3_11_X.test_rolling_upgrade|16 of 30|CASSANDRA-17306?| |dtest-upgrade.upgrade_tests.compatibility_flag_test.TestCompatibilityFlag.test__compatibility_flag_on_3014|1 of 30|[No JIRA found|https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=496&quickFilter=2252]| |org.apache.cassandra.distributed.test.ring.BootstrapTest.readWriteDuringBootstrapTest|1 of 30|CASSANDRA-17139?| |org.apache.cassandra.db.commitlog.BatchCommitLogTest.testEqualRecordLimit[3]-cdc|1 of 30|[No JIRA found|https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=496&quickFilter=2252]| |org.apache.cassandra.db.lifecycle.LogTransactionTest.testGetTemporaryFilesSafeAfterObsoletion-cdc|4 of 30|CASSANDRA-17286?| |dtest-upgrade.upgrade_tests.upgrade_through_versions_test.TestProtoV3Upgrade_AllVersions_EndsAt_3_11_X.test_rolling_upgrade_with_internode_ssl|16 of 30|CASSANDRA-17306?| |org.apache.cassandra.transport.CQLConnectionTest.handleCorruptionOfLargeMessageFrame|1 of 30|[No JIRA found|https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=496&quickFilter=2252]| |dtest-upgrade.upgrade_tests.upgrade_through_versions_test.TestProtoV3Upgrade_AllVersions_RandomPartitioner_EndsAt_3_11_X_HEAD.test_rolling_upgrade|16 of 30|CASSANDRA-17306?| |org.apache.cassandra.db.commitlog.BatchCommitLogTest.testOutOfOrderFlushRecoveryWithCompaction[3]-cdc|1 of 30|[No JIRA found|https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=496&quickFilter=2252]| |dtest-upgrade.upgrade_tests.upgrade_through_versions_test.TestProtoV3Upgrade_AllVersions_RandomPartitioner_EndsAt_3_11_X_HEAD.test_rolling_upgrade_with_internode_ssl|16 of 30|CASSANDRA-17306?| |dtest.repair_tests.incremental_repair_test.TestIncRepair.test_multiple_repair|1 of 30|CASSANDRA-11268?| |org.apache.cassandra.db.commitlog.GroupCommitLogTest.testRecoveryWithShortLog[3]-cdc|1 of 30|CASSANDRA-17232?| > 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.1 > > Time Spent: 4h 10m > 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-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org