-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
Fully Compatible
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
1
The value of sampleSize in the _id and metadata fields in the persistent sample doc schema is the size of the sample that was requested when analyze was run, not necessarily the actual size of the sample (which can be inferred from the length of the docs array). The actual size may be smaller for a few potential reasons:
- the collection size is smaller than the requested sample size
- chunk sampling results in fewer samples than originally requested
- documents are discarded from the original sample because they are too large to fit in a sample page
This has become a recurring source of confusion, so we should more accurately name the field requestedSampleSize.