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

fixed namespace clear issue #501

Merged
merged 4 commits into from
Sep 29, 2022
Merged

fixed namespace clear issue #501

merged 4 commits into from
Sep 29, 2022

Conversation

jaytist
Copy link
Contributor

@jaytist jaytist commented Sep 27, 2022

Please check if the PR fulfills these requirements

  • Followed the Contributing guidelines.
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage.
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
fixes #455

@codecov
Copy link

codecov bot commented Sep 27, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (b8a32ae) compared to base (c877fb0).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #501   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          319       319           
=========================================
  Hits           319       319           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jaytist
Copy link
Contributor Author

jaytist commented Sep 27, 2022

@jaredwray namespace issue for redis is fixed

@jaredwray
Copy link
Owner

referencing this issue: #455

@kdybicz - do you want to validate this fix works and has no issues?

@kdybicz
Copy link

kdybicz commented Sep 27, 2022

@jaredwray please correct me if I'm wrong, but I believe this fix will remove the namespace only when await keyv.clear(); is called. If so, it will still not prevent it to grow in size over time.

In other words:

  1. Test name doesn't correspond to what's really tested.
  2. Fix does resolve different issue - I'm not questioning importance of that fix here.
  3. Proposed solution doesn't introduce any "automated" way for removing expired members from the namespace key, which is the root cause of the growing memory usage.

Hope above points make sense.

@jaredwray
Copy link
Owner

@kdybicz - the question that we will have is if it is even possible to remove expired members from the namespace key.

@kdybicz
Copy link

kdybicz commented Sep 27, 2022

@jaredwray that's my main concern and I suspect it might not be possible. In such case it might make sense to simplify the test, just to make sure that await keyv.clear() does its job and maybe also add somewhere in the documentation a note that there might be some issues in high availability systems and it such cases it might require to schedule a periodical clear to deal with it.

A side question, as I didn't looked that deep into your code: is the namespace always needed?

@jaredwray
Copy link
Owner

going to add this in and then we might want to discuss a better way to handle this in the future where we just dont use namespace.

@jaredwray jaredwray merged commit 0200279 into jaredwray:main Sep 29, 2022
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.

Redis Fix - namespace key can grow to GB size
3 participants