Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-91429

Setting an end position on a positioned cursor requires a re-seek

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution

      The SortedDataInterface requires that setEndPosition should be called before seeking because the cursor bound is only set in seek. If an endPosition is set after seek, it has no effect and the cursor can be advanced beyond the end bound. Therefore we should throw an error in advanceNext and force the caller to re-seek.

      We should also allow setEndPosition on an unpositioned cursor without first calling seek. The idea is that the cursor should start from the start and stop at the end bound.

      Adopt _needSeek code and tests from SERVER-90281.

            Assignee:
            wei.hu@mongodb.com Wei Hu
            Reporter:
            wei.hu@mongodb.com Wei Hu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: