[ https://issues.apache.org/jira/browse/CASSANDRA-19130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17834854#comment-17834854 ]
Stefan Miklosovic commented on CASSANDRA-19130: ----------------------------------------------- few observations while I was working on the patch 1) there is this https://github.com/instaclustr/cassandra/blob/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java#L2756-L2762 With the proposed patch, when we "inject" timestamp into that method, if this logic kicks in, then we would have different timestamp resolved from what we provided, so timestamp would might "node-specific", depending on whether there is some kind of a drift or not. I don't this this is desirable so I would just get rid of that code completely, I am just not completely sure about the consequences of doing so. 2) What happens with the truncation when there is a mixed cluster in place? Eg. 5.0 GA + 5.1. So, on 5.1, when I execute TRUNCATE, TCM will disperse this to 5.1 nodes only, how to ensure that this will work for 5.0 nodes too? Doesn't there need to be some kind of a "bridge" to support this as well? Or do we say that we can not truncate in a mixed-version cluster and we just reject this? 3) Related to 2), when TRUNCATE is executed on a 5.0 node in mixed-version cluster with 5.1+ nodes, then we need to support this too. I think this is actually easier, becase if StorageProxy.truncateBlocking() on 5.0 sends TruncateRequest-s, it will be still treated by TruncateVerbHandler. We can leave TruncateVerbHandler in 5.1 even this would be merged so we are covered in this scenario. We would need to live with TruncateVerbHandler and TruncateRequest as long as we support upgrades from non-transactional truncation clusters to transactional-truncation ones. 4) I also decided to not include vtables into beign transactionally truncated because it doesnt make sense as described above. > Implement transactional table truncation > ---------------------------------------- > > Key: CASSANDRA-19130 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19130 > Project: Cassandra > Issue Type: New Feature > Components: Consistency/Coordination > Reporter: Marcus Eriksson > Assignee: Stefan Miklosovic > Priority: Normal > Fix For: 5.x > > Time Spent: 10m > Remaining Estimate: 0h > > TRUNCATE table should leverage cluster metadata to ensure consistent > truncation timestamps across all replicas. The current implementation depends > on all nodes being available, but this could be reimplemented as a > {{Transformation}}. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org