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

Does CreateKeyWithOptions function set retention time? #87

Open
ricrug opened this issue Feb 5, 2021 · 3 comments
Open

Does CreateKeyWithOptions function set retention time? #87

ricrug opened this issue Feb 5, 2021 · 3 comments
Assignees
Labels
doc-or-sample-fix This question arise due to lack of proper example, or a confusing one, thus requiring doc changes... question Further information is requested

Comments

@ricrug
Copy link

ricrug commented Feb 5, 2021

According to https://pkg.go.dev/github.com/RedisTimeSeries/redistimeseries-go#Client.CreateKeyWithOptions is it possible to define the retention time.

I used the example as shown in the documentation but it doesn't seem that the specified options are correctly applied.

127.0.0.1:6379>` TTL timeserie-1
(integer) -1
@filipecosta90 filipecosta90 self-assigned this Feb 5, 2021
@filipecosta90
Copy link
Collaborator

Hi there @ricrug let me check it and get back to you in some moments :)

@filipecosta90 filipecosta90 added bug Something isn't working question Further information is requested labels Feb 5, 2021
@filipecosta90
Copy link
Collaborator

@ricrug notice that the retention time that we talk about is the samples retention time, and not the time-serie. Meaning the TTL command, which is used for checking keys time to live is not useful here.

I'll change the example to explicitly state that retention time affects samples and will also include in the sample a simulated time range to demonstrate that some samples will not be returned after their retention time was surpassed. Keeping this issue open until I fix the docs/examples if you agree.

@filipecosta90 filipecosta90 added doc-or-sample-fix This question arise due to lack of proper example, or a confusing one, thus requiring doc changes... and removed bug Something isn't working labels Feb 5, 2021
@ricrug
Copy link
Author

ricrug commented Feb 5, 2021

I agree with you!
I would add that after a long time the data is still there. Are these the samples you refer to?

127.0.0.1:6379> TS.GET timeserie-1
1) (integer) 5
2) 60.5

I look forward to checking the documentation as soon as you update it. Please let me know when it's done so I can close the issue.

[UPDATE]
Same behaviour using CLI... what is wrong?

[UPDATE.2]
OK, it works... I got it! RTFM.... Maximum age for samples **compared to last event time**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-or-sample-fix This question arise due to lack of proper example, or a confusing one, thus requiring doc changes... question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants