-
Type:
Improvement
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Concurrency
-
None
-
Fully Compatible
-
Quint Iteration 3.1.2
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
The CollectionLock undocumented method relockWithMode() confusingly relocks the associated database lock as a side effect. This is unintuitive and often introduces scenarios where redundant locks are held.
For example: supposing a client holds database IX and collection IX. It is not expected that relocking the collection lock in X would also relock the database lock in X as a side effect (in which the reacquisition of the collection lock becomes redundant).
This method was introduced to facilitate the implicit collection creation path, and so existing callers that rely on this behavior will need an audit. This implicit collection creation use case should be kept in mind when deciding how to further improve the locking API.