SERVER-138565ClosedFixed

Refuse to persist stats on local collections

Local collections are not replicated. This presents an issue when persisting a sample for one, since the persistent samples collection is replicated and analyze can only be run on the primary. We should prevent persisting samples for them.

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc1025
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
analyze-hardening