Thanks Ramachandra_Tummala.
This is not my answer but this post is near.
actually , i want update only 100 document in one command in php app.
For example:
i have 7 documents in tmp
collection and have 3 server that want connect to the MongoDB server for run that command(one update command).
{
"_id" : 1,
"name" : "A",
},
{
"_id" : 2,
"name" : "B",
},
{
"_id" : 3,
"name" : "C",
},
{
"_id" : 4,
"name" : "D",
},
{
"_id" : 5,
"name" : "E",
},
{
"_id" : 6,
"name" : "F",
},
{
"_id" : 7,
"name" : "G",
}
In a hypothesis concurrency (limit of update is 3
):
Time ****************************** [id of docs modified]
|SV1 -----[Update CMD]------------> 1,2,4
Requests|SV2 ----------[Update CMD]-------> 5
|SV3 -------[Update CMD]----------> 3,6,7