On Fri, Aug 6, 2010 at 12:51 PM, Maifi Khan <maifi.k...@gmail.com> wrote: > Hi > I have a question about the internal of cassandra write. > Say, I already have the following in the database - > (row_x,col_y,val1) > > Now if I try to insert > (row_x,col_y,val100), what will happen? > Will it overwrite the old data? > I mean, will it overwrite the data physically or will it keep both the > old version and the new version of the data?
Assuming the old version is already on disk in an SSTable, the new version will not overwrite it, and both versions will be in the system. A compaction will remove the old version, however. > If the later is the case, can I retrieve the old version of the data? > No. And no, there is no plan to add that functionality. If it is needed it is simple to emulate in a variety of ways with the current feature set. This is recommended reading: http://maxgrinev.com/2010/07/12/update-idempotency-why-it-is-important-in-cassandra-applications-2/ b