-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
3
-
Tools and Replicator
-
0.25
-
Not Needed
Problem Statement/Rationale
type IndexDocument struct {
Options bson.M `bson:",inline"`
Key bson.D `bson:"key"`
PartialFilterExpression bson.D `bson:"partialFilterExpression,omitempty"`
}
The definition of IndexDocument is incorrect that if an index document has `partialFilterExpression` set to an empty document, the field would be omitted when marshaling it to BSON. For TTL indexes in time-series collections, this results in mongorestore failure to restore such indexes.
Steps to Reproduce
See SERVER-102799
Expected Results
Mongorestore should restore indexes with `partialFilterExpression` option correctly
Actual Results
Mongorestore failure:
Failed: ttl_test_demo.sensor_data: error creating indexes for ttl_test_demo.sensor_data: createIndex error: (InvalidOptions) TTL indexes on time-series collections require a partialFilterExpression on the metaField
- is related to
-
SERVER-102799 Creation of TTL indexes on time series collections with empty partialFilterExpression field
-
- Closed
-