[ https://issues.apache.org/jira/browse/CASSANDRA-19273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17811421#comment-17811421 ]
Yifan Cai commented on CASSANDRA-19273: --------------------------------------- We had an offline discussion on the approach for user to supplied the TTL value. Here is summary. {quote}To avoid confusion caused by allowing both 'clearSnapshot' option and 'snapshotTTL' option, we are going ahead with the new option, 'clearSnapshotStrategy', to determine whether snapshots should be cleared. The existing option, 'clearSnapshot', is deprecated but still accepted for backward compatibility. Possible values of 'clearSnapshotStrategy' are the following. {code:java} clearSnapshotStrategy: onCompletion // Only clear snapshot on the completion of the job. The onCompletion hook is evaluated at the best effort. It is possible the clear snapshot operation is not issued in some circumstances. clearSnapshotStrategy: noOp // Do not clear snapshot at all. clearSnapshotStrategy: onCompletionOrTTL [2d] // Clear the snapshot on completion or after the specified duration (2 days as the default), whichever comes first. Note that there is a risk that the snapshot is deleted before job completion if it takes more than the specified duration. In most cases, the job should complete before the default 2 days clearSnapshotStrategy: TTL [2d] // Only clear snapshot after 2 days clearSnapshot: true === clearSnapshotStrategy: onCompletionOrTTL clearSnapshot: false === clearSnapshotStrategy: noOp clearSnapshot option will be deprecated. For backward compatibility, we will still understand the option and resolve it to appropriate clearSnapshotStrategy option. {code} {quote} > Allow setting TTL for snapshots created by Analytics bulk reader > ---------------------------------------------------------------- > > Key: CASSANDRA-19273 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19273 > Project: Cassandra > Issue Type: New Feature > Components: Analytics Library > Reporter: Saranya Krishnakumar > Assignee: Saranya Krishnakumar > Priority: Normal > Time Spent: 2h 40m > Remaining Estimate: 0h > > Analytics user can add an existing snapshot's name or create a new snapshot > through reader options, from which data is bulk read from. Incase of creating > new snapshot, we want to allow users to set TTL option and have a default > value for the TTL. This is to make sure, in case of job failures, the > snapshots are cleared, to release space. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org