[DOCS-11807] Docs for SERVER-34902: view definitions should *not* allow $out as a stage Created: 17/Jun/18  Updated: 13/Nov/23  Resolved: 23/Oct/18

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.1.1, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng, read-only-views
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-34902 view definitions should *not* allow $... Closed
Related
related to DOCS-12086 Docs for SERVER-35419: Make diskRequi... Closed
Participants:
Days since reply: 5 years, 16 weeks, 1 day ago
Epic Link: DOCS: 4.2 Server/Tools

 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.



 Comments   
Comment by Githook User [ 23/Oct/18 ]

Author:

{'name': 'kay', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}

Message: DOCS-11807: view pipeline and stage restrictions
Branch: master
https://github.com/mongodb/docs/commit/b6e10f92e508f1c9504f0e006ef0138db9fc7e21

Generated at Thu Feb 08 08:03:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.