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

timeseries::MinMax::minUpdates/maxUpdates should consider calls to timeseries::MinMax::min/max when determining updates to include

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.4, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • v5.0
    • Execution Team 2021-06-28

      timeseries::MinMax::minUpdates/maxUpdates returns updates that have been made to the min/max since the last time the function was called. However, really it should really also consider any calls to timeseries::MinMax::min/max.

      The timeseries::MinMax usage pattern for time-series inserts is that timeseries::MinMax::min/max is called when a bucket is first created, and then subsequent inserts which update an existing bucket use timeseries::MinMax::minUpdates/maxUpdates. This means that, due to the behavior described above, the first call to timeseries::MinMax::minUpdates/maxUpdates for a given bucket includes updates for the entire min/max, as opposed to just the changes since the bucket was originally inserted. This is not a correctness issue, but does mean that applying the diff to the bucket may be doing extra unnecessary work in this case.

            kris.satya@mongodb.com Kris Satya (Inactive)
            gregory.noma@mongodb.com Gregory Noma
            0 Vote for this issue
            2 Start watching this issue