-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.0.0-alpha1
-
Component/s: None
-
None
<?php $a = $b = $c = $d = $e = $f = $g = $h = array("my" => "document"); $obj = array("document" => "my"); $bulk = new MongoDB\Driver\BulkWrite(true); $bulk->insert($a); $bulk->insert($b); $bulk->update($c, $obj); $bulk->update($d, $obj); $bulk->delete($e); $bulk->delete($f); $bulk->update($g, $obj); $bulk->delete($h); var_dump(count($bulk)); ?>
<?php $a = $b = $c = $d = $e = $f = $g = $h = array("my" => "document"); $obj = array("document" => "my"); $bulk = new MongoDB\Driver\BulkWrite(false); $bulk->insert($a); $bulk->insert($b); $bulk->update($c, $obj); $bulk->update($d, $obj); $bulk->delete($e); $bulk->delete($f); $bulk->update($g, $obj); $bulk->delete($h); var_dump(count($bulk)); ?>
Both of the above example result in 5 round-trips.
I would only have expected 3 round-trips as the update operations should have been merged, and so the delete bulks.
- depends on
-
CDRIVER-653 Rearrange unordered bulk ops
- Closed
- is related to
-
PHPC-193 Bulk delete and updates result in one roundtrip per document
- Closed
- related to
-
CDRIVER-736 Un-ordered bulks result in as many round-trips as ordered
- Closed