...
BugZero found this defect 18 days ago.
On MongoDB v8.1, if one creates a new time-series collection, and then creates an index over a measurement field (i.e. a field that is neither timeField nor metaField), for example: > db.createCollection("xyzzyts", {timeseries: {timeField: 't'}}) > db.xyzzyts.createIndex({x:1}) The following message gets logged by the server: {"t":{"$date":"2025-02-19T12:53:15.651+00:00"},"s":"I", "c":"STORAGE", "id":6057502, "ctx":"conn1","msg":"Detected that this time-series collection may have mixed-schema data. Attempting to build the index.",[...] This log message is misleading, because newly created time-series collections can not contain mixed-schema data: > MongoDB Enterprise > db.system.buckets.xyzzyts.aggregate([{$listCatalog:{}}]).toArray() [...] "timeseriesBucketsMayHaveMixedSchemaData" : false [...] Rather, the message appears to be logged by accident: timeseriesBucketsMayHaveMixedSchemaData checks with getTimeseriesBucketsMayHaveMixedSchemaData()" class="issue-link" data-issue-key="SERVER-93015">SERVER-93015 refactored the code associated to this log line but accidentally changed the semantics of the check from "optional is true" (if (*v)) to "optional has value" (if (v)).