[
https://issues.apache.org/jira/browse/CASSANDRA-5232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sylvain Lebresne updated CASSANDRA-5232:
----------------------------------------
Attachment: 5232.txt
That's a bug in DataTracker.replaceFlushed, that doesn't handle correctly the
case where there is no sstable created by the flush (and in that case one such
flush is triggered by the ALTER). Namely, it "removes" (from the DataTracker
instance, not from disk) all existing sstables. This actually comes from the
CASSANDRA-4667 (the second patch committed). So in practice that means that
ALTER TABLE is just one of the thing this broke, but this also break the atomic
batch guarantees (as the batchlog sstables might be discarded wrongfully).
Trivial patch attached.
> ALTER TABLE ADD - data loss
> ---------------------------
>
> Key: CASSANDRA-5232
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5232
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.2.1
> Reporter: Vasily V.D.
> Attachments: 5232.txt
>
>
> cqlsh:Test> CREATE TABLE t1 (id int PRIMARY KEY, t text);
> cqlsh:Test> UPDATE t1 SET t = '111' WHERE id = 1;
> cqlsh:Test> ALTER TABLE t1 ADD l list<text>;
> cqlsh:Test> SELECT * FROM t1;
> id | l | t
> ----+------+-----
> 1 | null | 111
> cqlsh:Test> ALTER TABLE t1 ADD m map<int, text>;
> cqlsh:Test> SELECT * FROM t1;
> cqlsh:Test>
> Last query doesn't return any data.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira