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

TS.ALTER does not update retention #2481

Closed
MR4online opened this issue Apr 25, 2023 · 1 comment · Fixed by #2483
Closed

TS.ALTER does not update retention #2481

MR4online opened this issue Apr 25, 2023 · 1 comment · Fixed by #2483
Labels

Comments

@MR4online
Copy link

Description

I do have a redis time series with retention set to a value > 0

When I want to change the retention back to 0 (disable it for this series), no change is done.
I think there may be an bug in the code in index.js line 127:

function pushRetentionArgument(args, retention) {
    if (retention) {
        args.push('RETENTION', retention.toString());
    }
    return args;
}

if retention === 0, it will not be added to the args array.

kind regards!

Node.js Version

v16.16.0

Redis Server Version

6.2.7

Node Redis Version

4.6.5

Platform

macOS

Logs

No response

@MR4online MR4online added the Bug label Apr 25, 2023
@leibale
Copy link
Collaborator

leibale commented Apr 25, 2023

🤦‍♂️

In the meantime you can use .sendCommand directly as a workaround:

client.sendCommand(['TS.ALTER', '...']);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants