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

Make cloneCollectionAsCapped work properly in case of concurrent DDLs

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • ALL

      Disclaimer: the command is not currently exposed on the router and can only be directly called on shards. Once SERVER-80416 will expose cloneCollectionAsCapped, the problem will surface.

      The cloneCollectionAsCapped command is currently unsafe because is does not properly serialize with concurrent DDLs on the same namespace and will be even more unsafe "tomorrow" (once unsharded collections will be tracked) because it only performs changes on the local catalog.

      Purpose of this ticket is to fix such limitation. The new implementation could perform an aggregation to copy the documents and create the new capped collection. More details in this comment.

            Assignee:
            backlog-server-catalog-and-routing [DO NOT USE] Backlog - Catalog and Routing
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: