Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11807

Docs for SERVER-34902: view definitions should *not* allow $out as a stage

    XMLWordPrintable

Details

    Description

      Description:

      1. `$out` is now disallowed in the pipeline for a view.
      2. Now, when creating a new view, the create function may not insert a valid view. This is because inserting a new view will cause the view catalog to be rebuilt (and reverified). If an existing invalid view (e.g. one that contains a `$out` pipeline stage) exists, then the server will error before inserting the new view.
      Because using an existing view doesn't cause the view catalog to be verified, users will not be alerted while using the existing, invalid view. This behavior we believe would be unexpected and should be documented.

      Scope of changes:

      Impact to other docs outside of this product:

      MVP:

      Resources:

      Engineering Ticket Description:

      We seem to allow $out stage as part of view definition.

      This is problematic for several reasons. One is that trying to append any stages (i.e. doing anything other than a simple find() on this view) will fail. The other is that running find on this view will blow away whatever is in the collection named in "$out" which is not an obvious outcome and unlikely to have a valid use case for it.

      Attachments

        Issue Links

          Activity

            People

              kay.kim@mongodb.com Kay Kim (Inactive)
              kay.kim@mongodb.com Kay Kim (Inactive)
              Kay Kim Kay Kim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                4 years, 7 weeks ago