You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "bschoening (via GitHub)" <gi...@apache.org> on 2025/08/02 01:39:18 UTC

[PR] CASSANDRA-20800: Updated tombstone note to clarify behavior with TTL and gc_grace_seconds [cassandra]

bschoening opened a new pull request, #4289:
URL: https://github.com/apache/cassandra/pull/4289

   Thanks for sending a pull request! Here are some tips if you're new here:
    
    * Ensure you have added or run the [appropriate tests](https://cassandra.apache.org/_/development/testing.html) for your PR.
    * Be sure to keep the PR description updated to reflect all changes.
    * Write your PR title to summarize what this PR proposes.
    * If possible, provide a concise example to reproduce the issue for a faster review.
    * Read our [contributor guidelines](https://cassandra.apache.org/_/development/index.html)
    * If you're making a documentation change, see our [guide to documentation contribution](https://cassandra.apache.org/_/development/documentation.html)
    
   Commit messages should follow the following format:
   
   ```
   <One sentence description, usually Jira title or CHANGES.txt summary>
   
   <Optional lengthier description (context on patch)>
   
   patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####
   
   Co-authored-by: Name1 <email1>
   Co-authored-by: Name2 <email2>
   
   ```
   
   The [Cassandra Jira](https://issues.apache.org/jira/projects/CASSANDRA/issues/)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] CASSANDRA-20800: Updated tombstone note to clarify behavior with TTL and gc_grace_seconds [cassandra]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #4289:
URL: https://github.com/apache/cassandra/pull/4289#discussion_r2249058635


##########
doc/modules/cassandra/pages/managing/operating/compaction/tombstones.adoc:
##########
@@ -13,8 +13,9 @@ At the end of its expiration period, the grace period, the tombstone is deleted
 
 [NOTE]
 ====
-You can also mark a {cassandra} row or column with a time-to-live (TTL) value. 
-After this amount of time has ended, {cassandra} marks the object with a tombstone, and handles it like other tombstoned objects.
+You can set a Time-To-Live (TTL) value to a row or column. If the data is compacted after the TTL has expired
+but before `gc_grace_seconds` has passed, the data will be written with an expired flag set to True, effectively acting as a tombstone.
+This situation arises only when gc_grace_seconds exceeds the original TTL.

Review Comment:
   The documentation should clarify what happens in the more common case when TTL is greater than gc_grace_seconds, or when they are equal, to provide a complete picture of TTL behavior.
   ```suggestion
   
   - If `gc_grace_seconds` exceeds the original TTL, the expired data (tombstone) will be retained until `gc_grace_seconds` elapses, ensuring that deleted data is not resurrected due to late replica synchronization.
   - If the TTL is greater than `gc_grace_seconds`, or if they are equal, the tombstone may be eligible for removal as soon as `gc_grace_seconds` has elapsed, which could result in the data being permanently deleted before all replicas have had a chance to synchronize. This increases the risk of deleted data reappearing (zombies) if a replica was down during the grace period.
   
   For safety, it is generally recommended to set `gc_grace_seconds` to a value greater than or equal to the maximum TTL used in the table, to avoid the risk of zombie data.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] CASSANDRA-20800: Updated tombstone note to clarify behavior with TTL and gc_grace_seconds [cassandra]

Posted by "bschoening (via GitHub)" <gi...@apache.org>.
bschoening closed pull request #4289: CASSANDRA-20800: Updated tombstone note to clarify behavior with TTL and gc_grace_seconds
URL: https://github.com/apache/cassandra/pull/4289


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org