ttl: ttl_expire_after
and ttl_expiration_expression
should not be allowed to be set at the same time
#109138
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
db-cy-23
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
We support two ways to effect row-level ttl:
ttl_expire_after
andttl_expiration_expression
.Today, we support both to be set at the same time on one table. Although there is nothing wrong per se (we can still define the expected behavior in this case) but it is confusing and bug prune. I think it's best that we disallow this case.
PS: a bug that currently exists as a result of allowing both to be set:
If we create a table with both parameter set,
RESET (ttl_expire_after)
will remove the whole TTL configuration but the expected behavior is to just removettl_expire_after
because we'd still havettl_expiration_expression
to vest TTL on this table. I guess this bug existed bc previously, we only supportttl_expire_after
and resetting it means remove/disable TTL on this table so it makes sense to remove TTL configuration altogether. Later, when we added support forttl_expiration_expression
, we forget to amend that behavior.Jira issue: CRDB-30800
Epic CRDB-29110
The text was updated successfully, but these errors were encountered: