Slow query logs on mongos have the wrong collectionType for aggregations on views

    • Query Integration
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The slow query log for an aggregation on a view on mongos will have the collectionType be "normal" and not "view". Curop keeps track of views in a map called resolvedViews, and uses this map to determine the collection type at the end of an operation. During view resolution, we add the view to the map here on mongod, but on mongos when we determine the collection type to log the operation, the map is empty, so the collectionType is "normal".

      This ticket with SERVER-114174 should also add tests for slow query logs on mongos in general.

      Repro is in the comments

      In SERVER-105541 we added a new map called knownTimeseriesNamespaces for viewless timeseries. That map has this exact problem. We should fix this for knownTimeseriesNamespaces either in this ticket or SERVER-114174.

            Assignee:
            Nishith Atreya
            Reporter:
            Gil Alon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: