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.
- causes
-
SERVER-78494 listCollections expects a renamed time-series collection with time-series options to have a time-series namespace
- Closed
- is related to
-
SERVER-75651 Exhaustively identify internal namespaces that should not be modified by user commands
- Backlog
-
SERVER-68383 Allow DDL operations directly on bucket namespace under C2C specifc Autorization resource
- Closed
- related to
-
SERVER-77261 Server allows renaming a “normal” collection to be system.buckets.
- Open