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

Allow writes on a collection string-matching ".system.resharding." for Resharding

    • Fully Compatible
    • Sharding 2020-10-19

      As of now, inserts are disallowed on a collection with ".system" in the collection name. A current exception is config.cache.chunks.config.system.sessions, since that collection must be writable as part of the replicated chunk metadata collection. We must also allow the resharding temporary collection's chunk metadata collection to be modified. The temporary resharding collection follows this pattern:

      For a db <db> and a collection with UUID <uuid>,

      <db>.system.resharding.<uuid>

      and the chunk metadata collection would be:

      config.cache.chunks.<db>.system.resharding.<uuid>

      So to capture both collections and to avoid being more permissive than the current collection name restrictions with regards to other collections matching ".system.", we should follow roughly this code:

      if (ns.coll().find(".system.resharding.") != std::string::npos) {
          return Status::OK();
      }
      

            Assignee:
            alex.taskov@mongodb.com Alexander Taskov (Inactive)
            Reporter:
            blake.oler@mongodb.com Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: