什么是 MongoDB 批处理操作最大大小? [英] What is MongoDB batch operation max size?

查看:49
本文介绍了什么是 MongoDB 批处理操作最大大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 MongoDB 文档:

According to MongoDB documentation:

批量操作规模

一个批量操作最多可以有 1000 个操作.

A bulk operation can have at most 1000 operations.

但是,我能够使用带有 node-mongodb-native(collection.initializeUnorderedBulkOp() 等)的 Mongo 2.6 批量操作 API 来使用批量更大的操作计数(大约 300k 次操作)

However, I was able to use bulk with much larger operations count (around 300k operations) using Mongo 2.6 bulk operations API with node-mongodb-native (collection.initializeUnorderedBulkOp() etc.)

这个限制是否过时了,还是我只是遗漏了什么?你知道什么是真正的极限吗?

Is this limit outdated, or am I just missing something? Do you know what is the real limit?

推荐答案

我在 MongoDB 的 Jira 中打开了一个.他们回答说:

I opened a ticket in MongoDB's Jira. They replied that:

你说得对;此限制需要在文档中进行一些说明.限制在服务器上,但客户端驱动程序通过将批量操作拆分为多个批次来向应用程序开发人员隐藏该限制.

You're correct; this limit needs some clarification in the documentation. The limit is on the server, but client drivers hide the limit from application developers by splitting bulk operations into multiple batches.

这篇关于什么是 MongoDB 批处理操作最大大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆