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

Building an index over time-series measurements may log a misleading "may have mixed-schema data" log message

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: 8.1.0-rc0
    • Component/s: None
    • Storage Execution
    • ALL

      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: 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)).

            Assignee:
            Unassigned Unassigned
            Reporter:
            joan.bruguera-mico@mongodb.com Joan Bruguera Micó
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: