[ https://issues.apache.org/jira/browse/CASSANDRA-12960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16161395#comment-16161395 ]
Aleksey Yeschenko commented on CASSANDRA-12960: ----------------------------------------------- See {{Hint.isLive()}}. We both keep truncation records, and look at them when replaying hints, doing exactly what [~jasonstack] suggested here. {{BatchlogManager}} also has similar code to avoid replaying truncated mutations. The overall problem with truncate however is that it itself is not atomic, and can fail partially. You should not use it in production, because it requires the whole cluster to be up, and well-behaving, and for nothing to go wrong while truncate is being issued. If a node goes down after availability was validated, but before getting truncate command, you are in all sorts of trouble. > Pending hinted hand-offs are replayed after TRUNCATE > ---------------------------------------------------- > > Key: CASSANDRA-12960 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12960 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging > Environment: Cassandra 2.2.8 > Amazon Linux AMI 2016.03 > Reporter: Yuji Ito > Priority: Minor > Attachments: stale_data.sh > > > I could read stale data after truncating a table. > The issue happens when the truncation is executed while a node is starting. > According to logs, pending hinted hand-offs were replayed after the > truncation. > *cluster*: > - C* 2.2.8 > - a cluster has 3 nodes > - replication_factor: 3 > *steps to reproduce* (the attached script): > # kill a node > # insert/update some records > # restart the killed node > # truncate the table (not to wait for the killed node's startup) > # kill another node (this step isn't essential) > # read all data -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org