[SERVER-70680] Enable bucket unpacking with sort for extended-range dates Created: 18/Oct/22  Updated: 05/Jan/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: 6.0.2
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Joel Redman (Inactive) Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-66793 Disable bucket unpacking with sort fo... Closed
is related to SERVER-67825 Investigate where time-series functio... Closed
Assigned Teams:
Query Optimization
Participants:

 Description   

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.


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