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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]