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

Granularity field automatically added to manually-created time-series buckets collections on v6.1- but not v6.2+

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Execution
    • ALL
    • 3

      Consider manually creating a time-series buckets collection with options {timeField: "t"}. After SERVER-67598 (i.e. as of v6.2), the requested buckets collection will get created with these exact options as specified. However, before SERVER-67598 (i.e. before v6.2), when issuing this same command it will automatically by transformed to {timeField: "t", granularity: "seconds"}. This is because in the IDL definition of the time-series options, the granularity field is now considered optional whereas previously it was considered non-optional with a default value of "seconds" if not explicitly specified.

      In either case the collection should functionally be the same (since "seconds" is the default behavior), however now consider the scenario where a mixed-version replica set is running with a primary node on version v6.2 (or v6.3 or v7.0) and a secondary node on version v6.1 (or v6.0). The primary node will create the collection and replicate the operation without the granularity in the collection options. However, the secondary node will implicitly add the granularity when applying the oplog entry. This means that the exact catalog entry for this collection will differ between the two nodes; it will explicitly have the granularity specified on one node and it will be excluded on the other node.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            gregory.noma@mongodb.com Gregory Noma
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: