Open dholms opened 1 year ago
Is this special-cased logic in the com.atproto.repo.deleteRecord method for follows, or where is this located?
There's precedent for this in two places that I know of.
There's a flag for this in the record processor, but it's only relative to indexing, that is the cascade does not actually delete additional records from repos: https://github.com/bluesky-social/atproto/blob/3a6d785ae086ab68376096a45a7d0cf1d25c1bf4/packages/pds/src/services/record/processor.ts#L85
Then setVote
is special-cased to clean-up duplicates at the repo level: https://github.com/bluesky-social/atproto/blob/3a6d785ae086ab68376096a45a7d0cf1d25c1bf4/packages/pds/src/api/app/bsky/feed/setVote.ts#L44-L53
My understanding of what @dholms wants to do is take the latter and generalize it into the repo.deleteRecord
method.
yup basically^^
Not special-cased to follows, it'd be a generic flag for backlinks. Although now that I think about it, this probably makes more sense to do off of a new "backlink table" (PDS construct) than it does off of the existing "duplicate-records table" (AppView construct)
Agree, we could sneak this in now, but it would make a lot more sense with a backlinks table already in place.
Duplicate records - ie two follows of the same person or two likes on the same post - can exist in the repo. On delete, we should default to deleting all duplicates, with an optional flag to only delete the specific record mentioned