Skip to content

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

Merged
e11sy merged 1 commit intomasterfrom
fix/redis-ts-retention
Apr 7, 2026
Merged

fix(): redis never throws key does not exist#539
e11sy merged 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

@e11sy e11sy merged commit d1c7af4 into master Apr 7, 2026
5 of 6 checks passed
@e11sy e11sy deleted the fix/redis-ts-retention branch April 7, 2026 13:27
e11sy added a commit that referenced this pull request Apr 7, 2026
* feat(workers): catch-unhandled-exceptions (#532)

* feat(workers): add decorator to catch unhandled exceptions and report them to Hawk with worker type context

* fix lint

* Revert "fix lint"

This reverts commit 7a7c0a9.

* Revert "feat(workers): add decorator to catch unhandled exceptions and report them to Hawk with worker type context"

This reverts commit ebb1fd7.

* refactor(runner): add active worker names to HawkCatcher context

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

---------

Co-authored-by: KoshaevEugeny <103786108+akulistus@users.noreply.github.com>
Co-authored-by: e11sy <130844513+e11sy@users.noreply.github.com>
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.

3 participants