[
https://issues.apache.org/jira/browse/CASSANDRA-14751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
C. Scott Andreas updated CASSANDRA-14751:
-----------------------------------------
Component/s: Distributed Metadata
> Can't truncate counter CFs via Thrift
> -------------------------------------
>
> Key: CASSANDRA-14751
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14751
> Project: Cassandra
> Issue Type: Bug
> Components: Distributed Metadata
> Environment: Cassandra 3.11.2
> Reporter: Erik Swanson
> Priority: Major
>
> When connecting to Cassandra 3.11.2 using Thrift, attempting to truncate a CF
> with counters results in "invalid operation for commutative table [table
> name]".
> It appears that there was no checking re this prior to the materialized views
> work. The materialized views work added:
> {{CFMetaData metadata = ThriftValidation.validateColumnFamily(keyspace,
> cfname, true);}}
> This was changed to `..., false);` in
> 3be99eeaa3546fecaf474d848eecca6aa0254a22, "ninja fix commutative op flag for
> truncate validation", but that fix (allowing truncation of CFs that do not
> include counters) breaks truncation of CFs that do contain counters.
> It's possible to truncate counter CFs via CQL, but that's no help re trying
> to get an application that uses Thrift to work, which needs to be able to
> truncate as part of its test suite.
> Because truncation via CQL works, or at least appears to work, would the
> appropriate fix be to change CassandraServer.truncate to use this function on
> ThriftValidation instead?:
> {{// To be used when the operation should be authorized whether this is a
> counter CF or not}}
> {{public static CFMetaData validateColumnFamily(String keyspaceName, String
> cfName) throws org.apache.cassandra.exceptions.InvalidRequestException}}
> {{{}}
> {{ return validateColumnFamilyWithCompactMode(keyspaceName, cfName, false);}}
> {{}}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]