-
Notifications
You must be signed in to change notification settings - Fork 47
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
Switch from tombstoning deleted objects to actually deleting them #1703
Comments
One catch: we can't delete |
^ Done, via I'm also running a workflow to delete all existing deleted gcloud dataflow jobs run 'Delete Object.deleted datastore entities' \
--gcs-location gs://dataflow-templates-us-central1/latest/Firestore_to_Firestore_Delete \
--region us-central1 \
--parameters firestoreReadGqlQuery="SELECT __key__ FROM Object WHERE deleted = TRUE",firestoreReadProjectId=bridgy-federated,firestoreDeleteProjectId=bridgy-federated,firestoreHintNumWorkers=100 |
Next step, delete all old Objects (eg >90d) that should now be expired due to our new logic. |
Doing this with the same dataflow template as above (note the gcloud dataflow jobs run 'Delete activity Object datastore entities' \
--gcs-location gs://dataflow-templates-us-central1/latest/Firestore_to_Firestore_Delete \
--region us-central1 \
--parameters ^.^firestoreReadGqlQuery="SELECT __key__ FROM Object WHERE type IN ARRAY ('post', 'update', 'delete', 'accept', 'block', 'flag', 'reject', 'stop-following', 'undo')".firestoreReadProjectId=bridgy-federated.firestoreDeleteProjectId=bridgy-federated.firestoreHintNumWorkers=100 |
Currently getting a breakdown of obj = Object(type=None)
while obj:
print(obj.type)
count = Object.query(Object.type == obj.type).count()
print(count)
obj = Object.query(Object.type > obj.type).get() |
Here's the breakdown, first the big ones:
...and all, by type:
|
Looked at how many of the big ones are over 90d old, specifically from before Oct 2024, the fractions range widely:
|
When we get a
Delete
, right now we setObject.deleted
toTrue
, and we have to check that flag everywhere. This originally seemed like a good idea, long ago when I was young and foolish, but I don't know that it's ever bought us anything, and it's a liability. We should switch to actually deleting.The text was updated successfully, but these errors were encountered: