Skip to content

fix(): redis never throws key does not exist#539

Open
e11sy wants to merge 1 commit intomasterfrom
fix/redis-ts-retention
Open

fix(): redis never throws key does not exist#539
e11sy wants to merge 1 commit intomasterfrom
fix/redis-ts-retention

Conversation

@e11sy
Copy link
Copy Markdown
Contributor

@e11sy e11sy commented Mar 31, 2026

Issue

In redis time series keys were created without retention — that leads to memory leaks, since keys are never archived

Cause

from redis docs

Notes:
When specified key does not exist, a new time series is created.

so when we called tsAdd method and waited for TSDB: key does not exist error we did it wrong

it never fires an error, but it automatically creates the key with retention 0 as we saw on stage

Solution

first — create key if not exists
second — increment key that was created with valid retention in the previous step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants