Mongosync maintains an internal mapping of source & destination collection UUIDs. Because we can’t update that mapping atomically with creating the collection, mongosync does the following:
- Create the destination collection using a temporary name: mongosync.tmp.$srcUUID
- Update mongosync’s UUID map.
- Rename the destination collection (preserving its UUID).
The rationale is that, if mongosync goes down at any point in the above workflow, the failure is recoverable.
Time-series collections don’t presently seem to work with this workflow because they can’t be renamed—either the “aggregate” collection (view + bucket) or the internal bucket collection. (We can create & drop buckets directly, but not rename them.)
If I’m understanding everything about this properly, then, it would seem that mongosync requires some way to rename time-series collections—or at least their buckets—in order to support these collections.
For C2C’s purposes it should suffice to ensure the user has setUserWriteBlockMode authorization.