Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-102597

Fix lock acquisition ordering for legacy timeseries missing view in write path

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: 8.2.0-rc0
    • Component/s: Catalog, Write Ops
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2025-03-31
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the new buckets collection acquisition code added in SERVER-101680, if we attempt to acquire a legacy timeseries collections (i.e. one where a view plus system.buckets-prefix collection would be normally expected), but which is missing the view (e.g. because a stepdown), we accidentally acquire both the view and buckets namespace locks, in this order.

      On the other hand, when dropping a well-formed time-series collection, the locks are acquired in buckets then view order.

      This has potential for creating in a deadlock due to conflicting lock acquisition orderings.

            Assignee:
            joan.bruguera-mico@mongodb.com Joan Bruguera Micó
            Reporter:
            joan.bruguera-mico@mongodb.com Joan Bruguera Micó
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None