-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.5.13
-
Component/s: Aggregation Framework, Replication
-
Fully Compatible
-
ALL
-
v3.6
-
Repl 2017-11-13, Repl 2017-12-04
The server currently allows something like the following:
db.c.drop(); db.v.drop(); db.c.insert({}); db.createView("v", "c", []); db.v.aggregate([{$changeStream: {}}]);
However, there is no machinery to produce notifications for changes to a view that occur based on writes to the view's backing collections. As such, notifications will never be delivered to the client for changes to views. Since this use case is not supported, the server should return a clear error message when a user attempts to establish a $changeStream cursor on a view. The current behavior is to establish a $changeStream cursor that will never return any results.