Currently dropping a timeseries collection in a replica set does not hold locks throughout but rather it first does a catalog lookup without holding locks, and then later it drops and re-acquires the locks when aborting index builds.
聽
This can result in a timeseries collection fully or partially skipping the drop, For example:
- Drop may first see that a timeseries collection is viewful.
- Immediately afterwards the collection is upgraded to a viewless "myts" collection.
- Drop will find neither the "system.buckets.myts" collection nor "myts" view so it will conclude that the collection is already dropped and there is nothing to do.
聽
In the case of an upgrade, the drop can be fully skipped. In the case of a downgrade, the drop can be partially skipped (drop buckets collection but not view).
A reproducer is attached.
- related to
-
SERVER-117460 Validate UUID mismatch in dropCollection via the Shard Role API
-
- Backlog
-
-
SERVER-109287 Acquire DDL locks also on replica sets
-
- Backlog
-
-
SERVER-99646 Unify collection locks for the timeseries view and buckets namespaces
-
- Backlog
-