-
Type: Investigation
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Not Needed
Sharding a time-series collection is enabled.
- The DDL operations for indexes and collMod are supported. The updating a granularity value is currently not supported on sharded clusters. We are planning to support this in 5.3.
- The sharding admins commands can only be run on the buckets namespace.
The shardCollection command accepts an optional timeseries parameter.
- If a timeseries collection already exists,
- Either the timeseries spec of the shardCollection command must match the collection spec.
- Or the timeseries spec should not be specified. In this case the timeseries spec from the collection catalog is inherited.
- If there is no existing collection and the timeseries parameter is specified, a new time series collection will be created.
The project is backported to 5.0.4 with the feature flag off. The feature will be enabled on 5.0.6
TimeseriesOptions:
description: "The options that define a time-series collection."
strict: true
fields:
timeField:
description: "The name of the top-level field to be used for time. Inserted
documents must have this field, and the field must be of the BSON UTC
datetime type (0x9)"
type: string
metaField:
description: "The name of the top-level field describing the series. This field is
used to group related data and may be of any BSON type. This may not
be \"_id\" or the same as 'timeField'."
type: string
optional: true
granularity:
description: "Describes the expected interval between subsequent measurements"
type: BucketGranularity
default: Seconds
bucketMaxSpanSeconds:
description: "The maximum range of time values for a bucket, in seconds"
type: safeInt
optional: true
validator:
Description of Linked Ticket
Summary
Support sharded time-series collections
Motivation
Add Sharding support for time series collection to allow for horizontal scaling of time series collections.
Cast of Characters
- Product Owner: Michael Gargiulo
- Project Lead: Arun Banala
- Program Manager: ana.meza
- Drivers Contact: