Defer shard server op observer implicit collection creation check until mongod is fully promoted to shard server

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When promoting a node to a shard server (by starting a mongod with --shardsvr option), the shard server op observer is created early in the promotion process. Once created, any collection creation will throw this exception unless a `
      ScopedAllowImplicitCollectionCreate_UNSAFE` object is instantiated even if the node hasn't yet completed its promotion to shard server.
      To work around this, we temporary instantiate this scoped object to FLE2 cleanup and compact operations to bypass the shard server op observer check. However, this scoped object's intended purpose is to track DDLs only after the node fully become a shard server.
      Therefore, as part of this ticket, we should:

      1. Remove the previously added scoped object instances from the FLE2 cleanup and compact commands;
      1. Defer the op observer check until the mongod is fully promoted to shard server, i.e., when the sharding state is enabled.

            Assignee:
            Unassigned
            Reporter:
            Anna Maria Nestorov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: