Halloween problem in $merge

XMLWordPrintableJSON

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

      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
              Reporter:
              Mickey Winters
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: