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 2021/06/14 07:33:06 UTC

[GitHub] [cassandra] blerer opened a new pull request #1061: CASSANDRA-16733(3.0): Add flag to disable ALTER...DROP COMPACT STORAGE statements

blerer opened a new pull request #1061:
URL: https://github.com/apache/cassandra/pull/1061


   


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

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


[GitHub] [cassandra] blerer closed pull request #1061: CASSANDRA-16733(3.0): Add flag to disable ALTER...DROP COMPACT STORAGE statements

Posted by GitBox <gi...@apache.org>.
blerer closed pull request #1061:
URL: https://github.com/apache/cassandra/pull/1061


   


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


[GitHub] [cassandra] blerer commented on a change in pull request #1061: CASSANDRA-16733(3.0): Add flag to disable ALTER...DROP COMPACT STORAGE statements

Posted by GitBox <gi...@apache.org>.
blerer commented on a change in pull request #1061:
URL: https://github.com/apache/cassandra/pull/1061#discussion_r650754292



##########
File path: src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
##########
@@ -290,6 +290,10 @@ public void validate(ClientState state)
                                                                     columnFamily()));
                 break;
             case DROP_COMPACT_STORAGE:
+
+                if (!DatabaseDescriptor.enableDropCompactStorage())
+                    throw new InvalidRequestException("DROP COMPACT STORAGE is disabled. Enable in cassandra.yaml to use.");

Review comment:
       That was my reasoning once you have run the command and saw the warning it is effectively too late :-(




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

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


[GitHub] [cassandra] adelapena commented on a change in pull request #1061: CASSANDRA-16733(3.0): Add flag to disable ALTER...DROP COMPACT STORAGE statements

Posted by GitBox <gi...@apache.org>.
adelapena commented on a change in pull request #1061:
URL: https://github.com/apache/cassandra/pull/1061#discussion_r650104833



##########
File path: src/java/org/apache/cassandra/config/Config.java
##########
@@ -322,6 +322,8 @@
 
     public boolean enable_materialized_views = true;
 
+    public volatile boolean enable_drop_compact_storage = true;

Review comment:
       Does this one need to be volatile?

##########
File path: src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
##########
@@ -290,6 +290,10 @@ public void validate(ClientState state)
                                                                     columnFamily()));
                 break;
             case DROP_COMPACT_STORAGE:
+
+                if (!DatabaseDescriptor.enableDropCompactStorage())
+                    throw new InvalidRequestException("DROP COMPACT STORAGE is disabled. Enable in cassandra.yaml to use.");

Review comment:
       When we added the experimental flags for MVs and SASI indexes in CASSANDRA-14866 we also added a client warning for each of them, [here](https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/schema/CreateViewStatement.java#L340) and [here](https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/schema/CreateIndexStatement.java#L148). Shouldn't we warn users about `DROP COMPACT STORAGE` being experimatal too, especially given that it's allowed by default in the config?

##########
File path: src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
##########
@@ -290,6 +290,10 @@ public void validate(ClientState state)
                                                                     columnFamily()));
                 break;
             case DROP_COMPACT_STORAGE:
+
+                if (!DatabaseDescriptor.enableDropCompactStorage())
+                    throw new InvalidRequestException("DROP COMPACT STORAGE is disabled. Enable in cassandra.yaml to use.");

Review comment:
       Of course the warning is not going to be that useful since in this case the damage is already done when the query is run. So probably it's better to just disable it by default.




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

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


[GitHub] [cassandra] adelapena commented on a change in pull request #1061: CASSANDRA-16733(3.0): Add flag to disable ALTER...DROP COMPACT STORAGE statements

Posted by GitBox <gi...@apache.org>.
adelapena commented on a change in pull request #1061:
URL: https://github.com/apache/cassandra/pull/1061#discussion_r654432816



##########
File path: test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTestBase.java
##########
@@ -131,6 +131,12 @@ public TestCase setup(RunOnCluster setup)
             return this;
         }
 
+        public TestCase runBeforeNodeRestart(RunOnClusterAndNode runBeforeNodeRestart)
+        {
+            this.runBeforeNodeRestart = runBeforeNodeRestart;
+            return this;
+        }

Review comment:
       Nice!




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

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


[GitHub] [cassandra] blerer commented on a change in pull request #1061: CASSANDRA-16733(3.0): Add flag to disable ALTER...DROP COMPACT STORAGE statements

Posted by GitBox <gi...@apache.org>.
blerer commented on a change in pull request #1061:
URL: https://github.com/apache/cassandra/pull/1061#discussion_r650754292



##########
File path: src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
##########
@@ -290,6 +290,10 @@ public void validate(ClientState state)
                                                                     columnFamily()));
                 break;
             case DROP_COMPACT_STORAGE:
+
+                if (!DatabaseDescriptor.enableDropCompactStorage())
+                    throw new InvalidRequestException("DROP COMPACT STORAGE is disabled. Enable in cassandra.yaml to use.");

Review comment:
       That was my reasoning. Once you have run the command and saw the warning it is effectively too late :-(




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

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