You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/03/24 21:33:59 UTC
[GitHub] [cassandra] dcapwell commented on a change in pull request #1453: CASSANDRA-17370 added enable for ALLOW FILTERING property
dcapwell commented on a change in pull request #1453:
URL: https://github.com/apache/cassandra/pull/1453#discussion_r834749895
##########
File path: test/unit/org/apache/cassandra/db/guardrails/GuardrailAllowFilteringTest.java
##########
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.db.guardrails;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class GuardrailAllowFilteringTest extends GuardrailTester
+{
+ private boolean enableState;
+
+ @Before
+ public void setupTest()
+ {
+ createTable("CREATE TABLE %s (k int PRIMARY KEY, a int, b int)");
Review comment:
nit: you don't need to create a table for each test, you can query the same table
##########
File path: src/java/org/apache/cassandra/config/GuardrailsOptions.java
##########
@@ -345,6 +345,20 @@ public void setReadBeforeWriteListOperationsEnabled(boolean enabled)
x -> config.read_before_write_list_operations_enabled = x);
}
+ @Override
+ public boolean getAllowFilteringEnabled()
+ {
+ return config.allow_filtering_enabled;
+ }
+
+ public void setAllowFilteringEnabled(boolean enabled)
Review comment:
`@Override`?
##########
File path: src/java/org/apache/cassandra/config/Config.java
##########
@@ -802,6 +802,7 @@ public static void setClientMode(boolean clientMode)
public volatile DataStorageSpec collection_size_fail_threshold = DISABLED_SIZE_GUARDRAIL;
public volatile int items_per_collection_warn_threshold = DISABLED_GUARDRAIL;
public volatile int items_per_collection_fail_threshold = DISABLED_GUARDRAIL;
+ public volatile boolean allow_filtering_enabled = false;
Review comment:
make this `true`, it should be allowed by default, else its a regression (also yaml says its true)
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org