-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Design doc for Upload/AssetBlob garbage collection #2068
base: master
Are you sure you want to change the base?
Conversation
98572f7
to
bd9740f
Compare
bd9740f
to
d2f3123
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @mvandenburgh. I am new to this garbage collection effort, but this design doc looks good from a high-level perspective.
Hi @yarikoptic, when you have a chance, can you please review this design doc? Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall design sounds straightforward sensible and would be great to see it implemented (as promised in the opening about the branch?).
Left only a few points and minor formatting tune ups.
Co-authored-by: Yaroslav Halchenko <[email protected]>
### Garbage collection event table | ||
|
||
```python | ||
from django.db import models | ||
|
||
class GarbageCollectionEvent(models.Model): | ||
type = models.CharField(max_length=255) | ||
created = models.DateTimeField(auto_now_add=True) | ||
records = models.JSONField() | ||
``` | ||
|
||
Note: the `records` field is a JSON serialization of the garbage-collected QuerySet, generated using [Django’s JSON model serializer](https://docs.djangoproject.com/en/5.1/topics/serialization/#serialization-formats-json)). This gives us the minimum information needed to restore a blob. The idea is that this can be reused for garbage collection of `Assets` as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update this section to reflect the many-to-one design we discussed recently?
This design document proposes a design for garbage collection of
Upload
andAssetBlob
records. A prerequisite to enabling this was the "trailing delete" feature that has landed in production (see doc)A design document for garbage collection of
Asset
records will follow this one.@yarikoptic @satra PTAL and comment here if you have any objections or general thoughts about the proposed process.