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

Stream / batch hook processing for updates #378

Open
alechenninger opened this issue Jul 18, 2017 · 3 comments
Open

Stream / batch hook processing for updates #378

alechenninger opened this issue Jul 18, 2017 · 3 comments

Comments

@alechenninger
Copy link
Contributor

Right now it looks like updates will pull many documents into memory at once. A heap dump shows 4000. Because updates pull in full documents, if these documents are large, it can quickly use up more than available heap, causing outages.

A client can work around by first retrieving ids of documents which match the query, and the iterate through them in smaller batches to apply the update. I don't see any reason lightblue couldn't do this server side.

@alechenninger
Copy link
Contributor Author

I suspect this would require streaming responses as updates are processed (since the heap is collected as apart of the OperationContext document list I assume is used for the respose).

@alechenninger alechenninger changed the title Process updates in smaller batches (and/or stream process them) Updates can use too much memory Jul 18, 2017
@alechenninger alechenninger changed the title Updates can use too much memory Stream update responses Jul 18, 2017
@alechenninger
Copy link
Contributor Author

alechenninger commented Jul 18, 2017

Another way to free up some memory for update responses may be to avoid keeping the original (full) documents around in memory longer than we need to.

@bserdar
Copy link
Contributor

bserdar commented Jul 18, 2017 via email

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

No branches or pull requests

2 participants