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

Allow create command to set bucketMaxSpanSeconds and bucketRoundingSeconds directly

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • Execution Team 2022-10-17
    • 3

    Description

      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

      Attachments

        Activity

          People

            adrian.gonzalez@mongodb.com Adrian Gonzalez Montemayor
            dan.larkin-york@mongodb.com Dan Larkin-York
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: