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

Potential wrong answers for fixed bucket sharded time series collections

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration

      Time series collections with fixed buckets (where the rounding is the same as the max span) allow for some optimizations to be applied to the whole-bucket and event filters, as well as optimizations to the $group stage.

      However, if there are extended range values, we can't apply these optimizations safely, since it could produce wrong answers.

      When we plan queries on mongos, we don't know which shards have extended range values and which do not. But we will apply fixed bucket optimizations if there were no extended range values on the DB primary. If mongos routes this plan to a shard with extended range values, we could get wrong answers.

      As part of the work of this issue we should add some of the test cases in jstests/sharding/timeseries/timeseries_query_extended_range.js to a test in core so that it can run in the unsplittable_collections passthrough. There seems to be some cases where we apply the fixed bucket rewrite for untracked collections even when there are extended range values.

            Assignee:
            Unassigned Unassigned
            Reporter:
            chris.wolff@mongodb.com Chris Wolff
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: