[CDRIVER-873] GridFS long seeks forward Created: 22/Sep/15  Updated: 03/May/17  Resolved: 18/Nov/15

Status: Closed
Project: C Driver
Component/s: GridFS
Affects Version/s: 1.2-rc0
Fix Version/s: TBD

Type: Improvement Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The specific example I have in mind is, If I read the beginning of a 200MB file, then seek ahead by 100MB and read again, what happens? Does the driver stupidly stream through 100MB of chunks, downloading all that data batch-by-batch from the server, until it reaches the proper chunk? I think the driver saves itself the effort of creating a new cursor in that case, but at great cost in network bandwidth....



 Comments   
Comment by Githook User [ 18/Nov/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-873 optimize gridfs long seeks
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/38cf613beb7bd74871f36ed8b101e0128a9fd579

Comment by Kyle Suarez [ 22/Sep/15 ]

We should detect the case that our current cursor must stream through several batches and:

1. Kill the cursor and invalidate it.
2. Open a new cursor that skips ahead to the appropriate location.

This should save on the network traffic.

Generated at Wed Feb 07 21:10:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.