ShardCollection fails due to missing index supporting the shard key

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When running with viewless timeseries, the ShardCollection command can fail with the following error (reproducer attached):

      uncaught exception: Error: command failed: {
          "ok" : 0,
          "errmsg" : "Please create an index that starts with the proposed shard key before sharding the collection. ",
          "code" : 72,
          "codeName" : "InvalidOptions",
      }

      The goal of this ticket is to investigate and fix the underlying issue.

            Assignee:
            Joan Bruguera Micó
            Reporter:
            Robert Sander
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: