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

Enable bucket unpacking with sort for extended-range dates

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 6.0.2
    • Component/s: None
    • None
    • Query Optimization

      Dates before 1-Jan-1970 are rounded towards 1970 (i.e. up) when calculating control.min.t for a bucket, rather than down as would be expected. This means that we are likely to have dates lower than control.min.t, bounded within the rounding error. It also means that sort order isn't preserved in timeseries indexes on the time field once you insert dates outside of the 32 bit epoch (roughly 1-Jan-1970 to 19-Jan-2038), because there can be a slight shuffle due to this rounding error.

      It should be possible to adjust _internalBoundedSort to account for this, restoring the use of indexes on control.min.t for sorting. A similar change should also be made to ensure correctness when filtering on control.min.t.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            joel.redman@mongodb.com Joel Redman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: