[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: |
|
||||||||||||
| 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 |
| Comments |
| Comment by Githook User [ 05/Apr/21 ] |
|
Author: {'name': 'Dan Larkin-York', 'email': 'dan.larkin-york@mongodb.com', 'username': 'dhly-etc'}Message: |
| 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. |