Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-15691

Investigate changes in SERVER-67598: Allow create command to set bucketMaxSpanSeconds and bucketRoundingSeconds directly

      Original Downstream Change Summary

      With this change, we make the create command time series option "granularity" an optional parameter (previously defaulted to 'seconds') and allow for users to specify "bucketMaxSpanSeconds" and "bucketRoundingSeconds" if "granularity" is not included in the command.

      These bucketing parameters must be set alongside each other and must be equal to each other. If custom "bucketMaxSpanSeconds" and "bucketRoundingSeconds" values are passed through, "granularity" should not be included in the create command.

      These parameters can only be changed to a higher value through the collMod command.

      Description of Linked Ticket

      We want to allow users to set 'bucketMaxSpanSeconds' and 'bucketRoundingSeconds' directly when they create a new time-series collection. We will enforce that 'bucketRoundingSeconds' is equal to 'bucketMaxSpanSeconds', and that both are strictly positive. If a user sets one value, they must set both. If a user sets these values, they cannot also set 'granularity'.

      Context:

      • bucketMaxSpanSeconds: "The maximum range of time values for a bucket, in seconds"
      • bucketRoundingSeconds: "Used to determine the minimum time boundary when opening a new bucket by rounding the first timestamp down to the next multiple of this value. Specified in seconds."

      Valid examples of timeseries options passed through to the create command:

      • {timeseries: {timeField: "time", granularity: "seconds"}} 
      • {timeseries: {timeField: "time", bucketRoundingSeconds: 3600, bucketMaxSpanSeconds: 3600}}
      • {timeseries: {timeField: "time", bucketRoundingSeconds: 8000, bucketMaxSpanSeconds: 8000}}
      • {timeseries: {timeField: "time", granularity: "seconds", bucketRoundingSeconds: 60, bucketMaxSpanSeconds: 3600}} // this is not an expected use case of the parameters but is allowed since the bucketMaxSpanSeconds and bucketRoundingSeconds are the default values corresponding to the 'seconds' granularity

            Assignee:
            david.hou@mongodb.com David Hou
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              1 year, 23 weeks, 6 days ago