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

TTL monitor races with shard merge importing donor collection step, leading to recipient TTL monitor stopped monitoring imported donor collection with ttl index.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Server Serverless 2022-10-17, Server Serverless 2022-10-31
    • 12

      Below is the racy scenario:

      1) Importer thread: Shard merge imports a donor collection, say 'tenant.foo', with TTL index. Then, it calls ownedCollection->init(opCtx); which initializes the in-memory data structure that holds the collection info (including the indexes info).init() method would in-turn make the *'tenant.foo' donor collection to get registered with TTL monitor *using the donor collection uuid.

      2) TTL monitor: Wakes from sleep, do another TTL pass and now notices 'tenant.foo' donor collection to be monitor. So, now it would query the in-memory collection catalog registry using the donor collection uuid to access the in-memory collection info data structure and couldn't find the entry. So, it thinks the collection is dropped and deregisters 'tenant.foo' donor collection' from TTL monitor.

      3) Importer thread: Now, this step in import donor collection would make the collection to get registered with in-memory collection catalog registry.

            Assignee:
            christopher.caplinger@mongodb.com Christopher Caplinger
            Reporter:
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: