开发者

Does the SSTable change when I update a column?

I understand that all insert operations will come to commitlog first, and Memtable second, after that it will be compacted to SSTable.

After compaction to SSTable, I perform an update operation for an existing column. Must the SS开发者_如何转开发Table be changed to update the value of that column?


http://wiki.apache.org/cassandra/MemtableSSTable says:

Once flushed, SSTable files are immutable; no further writes may be done

Your updated value will be written to commitlog, and a memtable, and will eventually be flushed to a new SSTable on-disk. Later, this SSTable may be merged with other SSTables to form a new larger SSTable (and the old ones will be discarded) - this is the compaction stage.


Answering your follow-up question: yes, and no - your values may end up in different SSTables until they are compacted, but you don't need to wait until a compaction to get the 'true' value, because the various versions of your value are timestamped, so Cassandra can return the most recent.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜