[DRIVERS-233] Do not validate the "startingFrom" field in OP_REPLY. Created: 03/Jun/15 Updated: 15/May/19 Resolved: 18/Aug/16 |
|
| Status: | Closed |
| Project: | Drivers |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Bernie Hackett | Assignee: | Barrie Segal |
| Resolution: | Done | Votes: | 0 |
| Labels: | newdriver | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Driver Compliance: |
|
||||||||||||||||||||
| Description |
|
OP_REPLY in the MongoDB wire protocol includes a "startingFrom" field. It is defined as a signed 32 bit integer. That's unfortunate since a MongoDB collection can have a much larger number of documents. If you validate this field (like the python driver...) a user that iterates a large collection (more than 2147483647 documents) will receive an error when the server overflows the startingFrom value and returns a negative number. The consensus of opinion seems to be that validating this field isn't particularly useful. If your driver does validate, remove the validation. http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/#op-reply |
| Comments |
| Comment by Jeremy Mikola [ 03/Feb/16 ] |
|
PHPC and HHVM defer to CDRIVER on this. Not relevant for PHPLIB. I'll have to follow up on the legacy PHP driver later, but I'm not sure it's worth the concern. |