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

Do not proactively set control.closed flag when closing a time-series bucket

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Execution Team 2023-02-06
    • 120

      In order to facilitate fast filtering of "full" buckets when doing query-based reopening, we began proactively setting the control.closed flag. This flag was already used by Online Archive to signal to the BucketCatalog that no future measurements should land in this bucket. However, setting the flag proactively makes it difficult to distinguish between buckets that are simply full and buckets that are about to be archived, a complication for other future changes.

      Instead of relying on the control.closed flag to determine if a bucket is full, we can check directly by seeing if e.g. data.<timeField>.999 is set (indicating we hit 1000 measurements) or if $bsonSize exceeds the limit (125KiB). The latter will necessitate moving to an aggregation instead of a simple query, but it is most likely worth the slight performance hit to allow future features to properly identify buckets that have been flagged by Online Archive.

            Assignee:
            fausto.leyva@mongodb.com Fausto Leyva (Inactive)
            Reporter:
            dan.larkin-york@mongodb.com Dan Larkin-York
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: