Make a DocumentSource which supports an iterator concept

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Inspired by SERVER-97356. We have the ability to return a batch of documents to feed a pipeline, and even to do so with a callback. We should extend this ability to allow a callback function to provide results in a stream. Something like this:

      class InputDataStream {
          virtual DocumentSource::GetNextResult getNext() = 0;
      };
      
      // allow constructing a DocumentSourceQueue with some implementation of the above.
      

      Conceptually, this might allow us to revert some pieces of SERVER-97356. We could re-implement new queue-like stages as a $queue, and keep all the special cases for $queue. I'm not sure it's worth changing the name back, but I like this design better.

            Assignee:
            Unassigned
            Reporter:
            Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: