WriteOptions.ttl method no longer accepts zero
See original GitHub issueThe method recently changed from
Assert.isTrue(!ttl.isNegative(), "TTL must be greater than equal to zero");
to
Assert.isTrue(!ttl.isNegative() && !ttl.isZero(), "TTL must be greater than equal to zero");
!ttl.isZero() was added, however,
- The message reported still makes it sound like 0 should be allowed
- The 0 seems to tell the Cassandra driver to disable TTL: https://docs.datastax.com/en/cql-oss/3.3/cql/cql_reference/cqlCreateTable.html#tabProp__cqlTableDefaultTTL
It seems like 0 should be allowed, but if not the error message should be corrected.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
TTL support in spring boot application using spring-data ...
Extend CassandraRepository to add save method that accepts TTL @NoRepositoryBean public interface ExtendedCassandraRepository<T, ...
Read more >Apply TTL via CrudRepository.save(…) [DATACASS-534] #703
I would like to know if we can insert /update row with an feature of TTL in Spring Data Cassandra using repository interfaces....
Read more >Using Time to Live
Time to Live (TTL) is a mechanism that allows you to automatically expire database records. TTL is expressed as the amount of time...
Read more >How to give ttl in Cassandra when inserting data in batches?
Accepted answer. /** * Add a collection of inserts with given {@link WriteOptions} to the batch. * * @param entities the entities to...
Read more >TtlDB - javadoc.io
TTL is accepted in seconds (int32_t)Timestamp(creation) is suffixed to ... Open1 at t=0 with ttl=4 and insert k1,k2, close at t=2; Open2 at...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We should allow zero to disable TTL.
@mp911de PR submitted 😃