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

MongoDb orm doesn't yet support batches and large result over 16 MB are cut off #486

Closed
colorcube opened this issue Oct 1, 2023 · 1 comment

Comments

@colorcube
Copy link
Contributor

There's a todo in packages/mongo/src/client/command/find.ts:

//todo: implement fetchMore and decrease batchSize

No matter how big the batchSize size is, the mongodb server has a limit of 16 MB for one batch. If your query result is greater than that (as bson), you won't get the full result because deepkit doesn't fetch the next result batch.

There won't be an error which is confusing because the result is not what you expect, while count() gives you the right number.

@marcj
Copy link
Member

marcj commented Oct 1, 2023

It was implemented at one point, we just have to go through the history. We need it also for aggregate command

@marcj marcj closed this as completed in 8a45194 Oct 1, 2023
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