DRM does not propagate optimizeAt elision to shards, leaking metadata into results

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • Fully Compatible
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Sharded DRM can be deserialized with `metadata=boost::none` because the router already ran elision in its own optimizeAt() and omitted it. However, on the shard optimizeAt() returns early (b/c getNeedsMerge() is always true there) and therefore never re-runs that notification, so the source stage is never told its metadata stream should be suppressed. It then keeps producing a metadata document which leaks into the main results pipeline where $replaceRoot(newRoot: "$payload") fails with 40228 because the leaked document has no `payload` field.

            Assignee:
            Aditya Deshpande
            Reporter:
            Daniel Segel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: