Currently, admins may reject any query by shape via QuerySettings.
However, this also currently allows rejection of administrative and internal commands. There is no forseen reason to block such requests, and doing so is only likely to hinder investigation of problem queries.
As such, at least the following queries should be protected from rejection:
- $querySettings
- $planCacheStats
- $collStats
- $indexStats
- $listSampledQueries
- $listSearchIndexes
- $listSessions
- $queryStats
- $currentOp
- $listCatalog
- $listLocalSessions
- $operationMetrics
This queries should not respect reject if set.
Additionally, when a representative query containing any of the above stages is provided to setQuerySettings with reject=true, the request should fail, informing the user that such queries cannot be rejected.