-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
Sharding EMEA 2021-05-17
When creating a sharded collection there are two events being reported:
- shardCollection.start with the shardKey, uuid, a flag to check if the collection is empty and the shardId
- shardCollection.end with two parameters: number of chunks created and the collection version
The uuid and the empty flag can only be determined after the _createCollectionAndIndexes step is executed, because we can check if the collection is empty after taking the critical section, and if there was no collection, that's the point where the uuid is created. If we move both parameters to the shardCollection.end event, then we can move the logging to the beginning kCommit phase (or maybe even to the kCheck phase). However, right now we don't know if this logging is being used, so, before doing the change we should do a quick check who's possibly using it.