-
Type: Investigation
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
3
-
TAR 2024-04-01, TAR 2024-04-15, TAR 2024-04-29, TAR 2024-05-13
-
Tools and Replicator
-
Not Needed
timeseriesBucketsMayHaveMixedSchemaData is a new option which can be provided to the collMod command for a time-series collection. This option can only be set to true (cannot use false). Setting it to true sets an internal flag on the time-series collection indicating that it may contain buckets holding mixed-schema data. Mixed schema time-series buckets were only possible to be created on older versions such as v5.0.
For time-series collections, some tools interface directly with the underlying buckets collection. If such a tool is used to restore old time-series data (inserted on v5.0 and containing mixed-schema buckets) into a new time-series collection, now inserting those old buckets may fail with a error code CannotInsertTimeseriesBucketsWithMixedSchema. If this error is received, use the new collMod option mentioned above. Then once the flag is set using collMod, the mixed-schema buckets can be successfully inserted.
Description of Linked Ticket
All newly created time-series collections have timeseriesBucketsMayHaveMixedSchemaData set to false. This flag never gets changed as time-series inserts through the view can never result in mixed-schema buckets. However, one can still insert mixed-schema buckets through the system.buckets collection (direct write) and we wouldn't update the flag to true. mongodump/mongorestore does this. We should check whether buckets inserted via direct writes contain mixed-schema data and set the flag appropriately.
- depends on
-
SERVER-84531 Inserting mixed-schema buckets through the system.buckets collection doesn't set the timeseriesBucketsMayHaveMixedSchemaData flag
- Closed
- is related to
-
TOOLS-3575 Support dump and restore mixed-schema timeseries buckets
- Closed