[SERVER-67598] Allow create command to set bucketMaxSpanSeconds and bucketRoundingSeconds directly Created: 28/Jun/22  Updated: 29/Oct/23  Resolved: 07/Oct/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Dan Larkin-York Assignee: Adrian Gonzalez Montemayor
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-67595 Introduce bucketRoundingSeconds time-... Closed
Documented
is documented by DOCS-15691 Investigate changes in SERVER-67598: ... Closed
Problem/Incident
Related
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-10-17
Participants:
Linked BF Score: 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


 Comments   
Comment by Githook User [ 07/Oct/22 ]

Author:

{'name': 'Adrian Gonzalez', 'email': 'adriangonzalezmontemayor@gmail.com', 'username': 'adriangzz'}

Message: SERVER-67598 Add support for maxSpanSeconds and roundingSeconds arguments
Branch: master
https://github.com/mongodb/mongo/commit/0406b63884d9993f0eafd7d6dcd680e0ecdc1a1f

Generated at Thu Feb 08 06:08:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.