[SERVER-73193] Do not proactively set control.closed flag when closing a time-series bucket Created: 23/Jan/23  Updated: 29/Oct/23  Resolved: 30/Jan/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Dan Larkin-York Assignee: Fausto Leyva (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-73379 Clean up kHardClose and kSoftClose usage Closed
Problem/Incident
Related
is related to SERVER-73440 Update time-series arch guide to refl... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2023-02-06
Participants:
Linked BF Score: 120

 Description   

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.



 Comments   
Comment by Githook User [ 27/Jan/23 ]

Author:

{'name': 'Faustoleyva54', 'email': 'fausto.leyva@mongodb.com', 'username': 'Faustoleyva54'}

Message: SERVER-73193 Do not proactively set control.closed flag when closing a time-series bucket
Branch: master
https://github.com/mongodb/mongo/commit/ffd636b1f009b826725f8c30ed8834e285f6d0e3

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