[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:
Depends
depends on RUST-18 Do not validate the "startingFrom" fi... Closed
depends on PYTHON-945 Remove validation of the OP_REPLY "st... Closed
Related
related to SERVER-18802 startingFrom field in OP_REPLY struct... Closed
Driver Compliance:
Key Status/Resolution FixVersion
PYTHON-945 Done 3.0.3, 2.9
RUST-18 Done
SWIFT-465 Done

 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.

Generated at Thu Feb 08 08:21:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.