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

[Question] Do we need to clean associated db in production? #12

Open
greenais opened this issue Apr 21, 2019 · 1 comment
Open

[Question] Do we need to clean associated db in production? #12

greenais opened this issue Apr 21, 2019 · 1 comment

Comments

@greenais
Copy link

Not an issue right now but could be kind of in production - so more sounds like a question:
connect warns that MemoryStore usage not recomended in production due to memory leaks (in fact it is as they still dind't implemet any kind of purging expired and not used sessions in memory).
AFAIK couchdb doesn't remove deleted docs from disk and just keeps them all in db marked as deleted (for sync purpose, which isn't the case with sessions, of cause).
So question is: does couchdb-expression implement any kind of purging deleted docs from db?
Otherwise it's even worsier than with MemoryStore where just unused sessions will free memory on app restart, when couchdb will store all used and unused deleted sessions (billions possibly) forever on disk.
Any thoughts?

@tkshnwesper
Copy link
Owner

That's a good point. To add to that, updating a document would create a new document (and mark it as latest) instead of simply changing the data of the existing document.

This does seem like a problem, however CouchDB has been thoughtful to provide an API to address these worries.

I think it might be a good thing to provide the user of the couchdb-expression API a configuration setting to optionally purge old records on deletion and updates.

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

No branches or pull requests

2 participants