When dropping a Timeseries collection we hold a MODE_X lock on the bucket collection but just a MODE_IX lock on the view namespace.
_abortIndexBuildsAndDrop called here is holding a MODE_X lock on the bucket Collection:
But the View is just holding a MODE_IX lock
If there is a create Collection happening concurrently (also MODE_IX) with dropping the view the operations may be written to the oplog out-of-order because create Collection reserves the oplog time before creating the Collection: https://github.com/mongodb/mongo/blob/fd808e64b2a34bedfeeef012c2ef9314bec08e8f/src/mongo/db/catalog/database_impl.cpp#L679-L692
When this is then applied on a secondary the Collection creation fails with an invariant because there already exist a timeseries view on the namespace.
A proposed solution is to hold a MODE_X lock on the view namespace when dropping timeseries collections.