Skip to content

WriteOptions.ttl method no longer accepts zero #1262

@duanemay

Description

@duanemay

The 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,

  1. The message reported still makes it sound like 0 should be allowed
  2. 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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions