-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TTL] Historical data may never expire #5131
Comments
Here is a relatively reasonable repair plan. We define two default values for each property, When we define a In the above case, default_read_value stores the actual time (the return value of Later, in the process of using ttl, if it is found that there is no ttl attribute when reading its value, it will be filled with default_read_value. If no ttl value is given when writing, it will be filled with default_write_value. In addition, subsequent modifications to 'DEFAULT' will only modify the |
And, if the value of property |
Another relatively simple repair method is to prohibit the use of "now()" as the default value on the ttl column, and do not allow the value to be NULL |
I suggest forbid use a default value of |
prefer to mark as a known issue. |
@abby-cyber discussed it with @MuYiYong offline: he suggested to update doc. |
Please check the FAQ documentation before raising an issue
Describe the bug (required)
After the above series of operations. The
ttl_tag1
of "1", "2" and "3" will never expire.This is because there is a problem with our definition of
default
. In this case, the default value ofttl
isnow()
.now()
, which will be stored in the definition ofttl
(it is the functionnow()
, not the return value of it).When we read a
ttl
if the property does not exist in tag1.ttl, it will get the default value from the schema definition. So forttl_tag1
of "1", "2" and "3", the latestnow()
will be calculated every time when reading, so they will never expire.Your Environments (required)
uname -a
g++ --version
orclang++ --version
lscpu
a3ffc7d8
)How To Reproduce(required)
Steps to reproduce the behavior:
Expected behavior
Additional context
The text was updated successfully, but these errors were encountered: