[SERVER-55661] Add optional flag to force closure of a bucket without meaningfully altering its contents Created: 31/Mar/21  Updated: 06/Apr/21  Resolved: 05/Apr/21

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

Type: Task Priority: Major - P3
Reporter: Dan Larkin-York Assignee: Dan Larkin-York
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Issue split
split from SERVER-55060 direct modification must remove bucke... Closed
Sprint: Execution Team 2021-04-19
Participants:

 Description   

The fastest way would likely be to add a new field `closed: true` to the bucket, triggering the OpObserver and clearing the bucket from the catalog. This would require a schema change for the buckets collection. It would result in an actual write to the document (which must be replicated), additional space usage, and encodes side effects on the BucketCatalog on this "no-op" op.

A more sophisticated way, which would not require any document alteration, replication, or encoded side effects, would be to introduce a new administrative command to clear a bucket (or a namespace if that's desired) directly. This would obviously require a bit more a heavy-lifting, ACL controls, scoping, etc.

Conveniently, either way, the necessary BucketCatalog functionality is already supplied by SERVER-55060.



 Comments   
Comment by Githook User [ 05/Apr/21 ]

Author:

{'name': 'Dan Larkin-York', 'email': 'dan.larkin-york@mongodb.com', 'username': 'dhly-etc'}

Message: SERVER-55661 Add optional flag to force closure of a bucket without meaningfully altering its contents
Branch: master
https://github.com/mongodb/mongo/commit/81386a8f855b7db08cf9ff579335c133418bf36c

Comment by Dan Larkin-York [ 05/Apr/21 ]

Decision was made to add the optional "control.closed" field for now. In the future we could provide a no-write alternative as an optimization.

Comment by Louis Williams [ 31/Mar/21 ]

I am in favor of accepting an optional "closed" field in the document schema. The space impact is negligible, and this will not be a frequent operation such that we should be concerned about the replication impact.

Creating a command to do this would be great, but for the listed reasons, this is well beyond the scope of what we need. We already a) permit direct writes to the buckets collection and b) are building support to have these direct writes close buckets.

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