How default_time_to_live would delete rows without tombstones in Cassandra?

前端 未结 2 685
忘掉有多难
忘掉有多难 2021-01-12 15:19

From How is data deleted?

Cassandra allows you to set a default_time_to_live property for an entire table. Columns and rows marked with regular TTLs a

2条回答
  •  日久生厌
    2021-01-12 15:47

    I have been fooled by the piece of documentation you mentioned when answering this question on our blog (The Last Pickle Blog). I probably answered this one too quickly, even though I wrote this a thing 'to explore', even saying I did not try it explicitly.

    Another clue to explore would be to use the TTL as a default value if that's a good fit. TTLs set at the table level with 'default_time_to_live' should not generate any tombstone at all in C*3.0+. Not tested on my hand, but I read about this.

    So my sentence above is wrong. Basically, the default can be overwritten by the TTL at the query level and I do not see how Cassandra could handle this without tombstones.

    From the example I conclude that isn't true that default_time_to_live not require tombstones, at least for version 3.0.13.

    Also, I am glad to see you did not believe me or Datastax documentation but tried it by yourself. This is definitively the right approach.

    But how would C* delete without tombstones? Why this should be a different scenario to using TTL per insert?

    Yes, exactly this,

    C*heers.


    Alain Rodriguez - @arodream - alain@thelastpickle.com France / Spain

    The Last Pickle - Apache Cassandra Consulting http://www.thelastpickle.com

提交回复
热议问题