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

Halloween problem in $merge

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL

      we currently have this test https://github.com/mongodb/mongo/blob/master/jstests/noPassthrough/query/out_merge/aggWrite/merge_causes_infinite_loop.js that shows $merge suffers from the Halloween problem. It has previously been proposed to fix this by using snapshot reads or spooling documents to be merged into the collection. for example we could implement a $spool agg stage that potentially spills to disk and only returns data after receiving EOF from its child. or passing along a snapshot time to producer/shard part cursors. These solutions could require some major tweaks to the way $merge works.

            Assignee:
            Unassigned Unassigned
            Reporter:
            mickey.winters@mongodb.com Mickey Winters
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: