|
Context
- config.chunks collections with 811k documents
- Compass Version 1.21.2
Steps:
- Add $group stage with code:
{
|
_id: "$shard",
|
count: {
|
$sum: 1
|
}
|
}
|
- Turn off sample mode
- Add a $out stage to collection chunks_summary
- See that output document in chunks_summary includes { "_id" : "shard_5", "count" : 5 }
Expected:
- The document in chunks_summary should have had count 626.
- I would never expect the sampling to be applied to the $out even if Sample mode was enabled
Theory
- It seems that turning off sample mode on an existing pipeline doesn't apply directly.
Workaround:
- If I start a new pipeline, then turn off sample mode before creating any stages it works.
|