Skip to content

Conversation

@e11sy
Copy link
Contributor

@e11sy e11sy commented Apr 3, 2025

Problem

The problem is that we do not delete any of the inserted redis records (related to the notification rules)
this leads to memory leak

Solution

  • Add ttl for every redis key, used for notification counters (ttl equals to the rule thresholdPeriod, when ttl passed, record will be deleted from the redis store)
  • Cover expiration with tests

@e11sy e11sy merged commit 046eac0 into master Apr 3, 2025
4 checks passed
@e11sy e11sy deleted the redis-memory-leak-fix branch April 3, 2025 17:25
e11sy added a commit that referenced this pull request Apr 3, 2025
* imp(notifier): add ttl for redis records

* imp(notifier): replace hardcoded value with util const

Co-authored-by: e11sy <130844513+e11sy@users.noreply.github.com>
neSpecc added a commit that referenced this pull request Apr 6, 2025
* imp(notifier): add ttl for redis records (#391)

* imp(notifier): add ttl for redis records

* imp(notifier): replace hardcoded value with util const

* fix(base64): update b64decode to use 'utf-8' encoding and add base64toBuffer utility function (#394)

- Changed b64decode function to decode base64 strings using 'utf-8' instead of 'binary'.

---------

Co-authored-by: e11sy <130844513+e11sy@users.noreply.github.com>
Co-authored-by: Peter <specc.dev@gmail.com>
neSpecc added a commit that referenced this pull request Apr 6, 2025
* imp(notifier): add ttl for redis records (#391)

* imp(notifier): add ttl for redis records

* imp(notifier): replace hardcoded value with util const

* fix(base64): update b64decode to use 'utf-8' encoding and add base64toBuffer utility function (#394)

- Changed b64decode function to decode base64 strings using 'utf-8' instead of 'binary'.

* imp(release): source map saving in transaction to solve race condition issue (#390)

* imp(release): save map files in same transaction with real

* test(release): test release with many map files

* test(release): setup repl set for release worker tests

* test(global): use mongo with replica set for tests

* chore(test): close connection to avoid open handle

* chore(release): uncomment endSession

---------

Co-authored-by: e11sy <130844513+e11sy@users.noreply.github.com>
Co-authored-by: Peter <specc.dev@gmail.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.

2 participants