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

shard time series collection using hash of timefield should return better error message

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Execution

      currently (5.1)

      db.runCommand({ create: "tscoll", timeseries:{timeField: 'time', metaField: 'id' }})

      db.adminCommand({ shardCollection: "test.tscoll", key:

      { time: "hashed" }

      , numInitialChunks: 6 } 

      returns

      "errmsg" : "Invalid index spec for time-series collection: { time: \"hashed\" }. Indexes on the time field must be ascending or descending (numbers only): time: \"hashed\""

       

      it shoudl instead alert the user the sharding on timeField should only be using range ("1") partitioning.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            rushan.chen@mongodb.com Rushan Chen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: