SERVER-137905In Code Review

add a pre-scan check for prepareConstraintLevel to collMod

The prepare precondition is only checked after the validator scan in collmod_cmd.cpp / collmod_coordinator.cpp has already run. A request with prepare unset therefore does a full collection scan before being rejected with BadValue. We should do a cheap precondition check before the scan.

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

No labels assigned.