Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-26037

DocumentSourceCursor should report appropriate error on encountering a view




      It is currently possible for DocumentSourceCursor to encounter a view namespace when acquiring a collection lock on what it expects to be a collection. When this occurs it uasserts with 'CommandNotSupportedOnView' which is the correct behavior but not the correct error. We should return a more appropriate error in this scenario which can be reach via the following sequence (and reproducible under an fsm test being written for SERVER-25808):

      1. A find is run against a view
      2. DB & collection locks are dropped for conversion of find to agg on the view
      3. The view is dropped
      4. The aggregation is then executed against the former view namespace (executing on the non-view path)
      5. Aggregation drops the DB & collection locks upon establishing a ClientCursor obj
      6. The view is recreated
      7. DocumentSourceCursor attempts to establish DB & collection locks with the understanding that the namespace is a collection. It uasserts with 'CommandNotSupportedOnView' when it finds that the namespace is a view.


          Issue Links



              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created: