-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: 4.0.4
-
Component/s: Performance, Sharding
-
None
-
ALL
-
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
When using a sharded setup, trying to tail changestream via mongos (as suggested by the docs), returns changes in "batches" instead of live.
If you tail the changestream via the replicaset directly (which is not the point, because you want to use sharding), then it works as expected i.e updates come in "live" not in "batches".
You can see if an update is coming in "live" or "delayed" by printing the time difference between now & the clusterTime (from the received change).
This is tested this against:
- mongo client
- a database with sharding enabled
- a database without sharding enabled
They all reproduce the same effect.