-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
Online Archive on Time Series collections (CLOUDP-186896) operates on the system bucket document collection instead of the user-facing view to maximize archival throughput and minimize load on the customer's cluster. We run three operations:
1. UpdateMany, filter for bucket documents for which the max value of the timeField is less than some given ISODate, set `control.closed` to true.
2. Find, filter for bucket documents for which the max value of the timeField is less than some given ISODate AND `control.closed` is true.
3. Delete, filter on a list of _ids.
Currently, we plan to accomplish this by querying/updating control.min.<timeField> and control.closed directly, and potentially also control.max.<timeField> and _id. But this gives Online Archive a dependency on the format of bucket documents and prevents the server team from changing the format. So instead, we want custom MongoDB commands for finding, closing, and possibly also deleting bucket documents so we do not depend on any particular format but we can still operate on bucket documents directly.