SERVER-139461Needs Scheduling

Limit Sample Size value in collMod

SERVER-137869 updates the analyze command so that it respects the sample size limit set in collMod/createCollection. However, there's no support for any limits on this value. If users ask for a huge sample size, we risk storing a sample large enough to crash the server every time it's loaded. For this task, we need to assess this risk and implement a limit or some other protective measure that removes this risk.

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification
security