Skip to content
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

creating down sample modifies the retention duration #527

Open
localvar opened this issue Mar 8, 2024 · 0 comments
Open

creating down sample modifies the retention duration #527

localvar opened this issue Mar 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@localvar
Copy link
Contributor

localvar commented Mar 8, 2024

Describe the bug(Bug 描述)

I create a database with default retention policy (that's duation is infinite), then I create a down sample with duration set to 70d and found the retention duration of the database becomes 70d too.

as mentioned in #525, I think the usage of duration in down sample is weird.

To Reproduce(Bug 复现步骤)

> create database db0
> use db0
> show retention policies on db0
+---------+----------+--------------------+--------------+---------------+----------------+----------+---------+
|  name   | duration | shardGroupDuration | hot duration | warm duration | index duration | replicaN | default |
+---------+----------+--------------------+--------------+---------------+----------------+----------+---------+
| autogen | 0s       | 168h0m0s           | 0s           | 0s            | 168h0m0s       |        1 | true    |
+---------+----------+--------------------+--------------+---------------+----------------+----------+---------+
8 columns, 1 rows in set

> create DownSample on db0.autogen (float(min,max,count,sum,first,last)) with duration 0s sampleinterval(7d, 14d) timeinterval(1m,3m)
ERR: max sample interval time must be smaller than retention policy duration
> create DownSample on db0.autogen (float(min,max,count,sum,first,last)) with duration 70d sampleinterval(7d, 14d) timeinterval(1m,3m)
> show retention policies on db0
+---------+-----------+--------------------+--------------+---------------+----------------+----------+---------+
|  name   | duration  | shardGroupDuration | hot duration | warm duration | index duration | replicaN | default |
+---------+-----------+--------------------+--------------+---------------+----------------+----------+---------+
| autogen | 1680h0m0s | 168h0m0s           | 0s           | 0s            | 168h0m0s       |        1 | true    |
+---------+-----------+--------------------+--------------+---------------+----------------+----------+---------+
8 columns, 1 rows in set

note the down sample does not allow me to use 0s for infinite duration.

Expected behavior(期望结果)

No response

Screenshots(屏幕截图)

No response

Logs(完整的错误日志)

No response

Additional context(其他的一些补充内容)

No response

@localvar localvar added the bug Something isn't working label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant