Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-252

Allow seeking to advance chunk iterator instead of always re-querying

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.3.1
    • Affects Version/s: 1.2.0
    • Component/s: None
    • Labels:
      None

      The implementation of PHPLIB-213 currently reinitializes the chunk iterator if the chunk offset would change by the seek operation. If the chunk offset does not change, we simply modify the buffer's offset (which applies to the current chunk's data).

      When seeking to a previous chunk, we definitely need to reinitialize the chunk iterator (i.e. re-query and use a new cursor); however, seeking forwarding only requires that we advance the iterator forward. We should consider when it makes sense to re-query the database vs. advance, as it's likely more efficient to issue one new query rather than advance through multiple batches.

            Assignee:
            katherine.walker@mongodb.com Katherine Walker (Inactive)
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: