Skip to content

getFollows API is Persisting Already Removed Followers for a DID on a Self-Hosted PDS #190

Description

@eddieoz

Description

The getFollows API is returning a list of followers that do not exist on the PDS. If I add a new follow and remove it, I can see the rkey added to the app.bsky.graph.follow collection on store.sqlite/record. However, the getFollows API now returns the new follow, plus many records that were already removed from my PDS.

Last week, I removed all follows to check if the list could update, but it didn't. If I unfollow a user, it removes the record properly from store.sqlite/record and adds a new line in sequencer.sqlite/repo_seq, but the getFollows API still returns the previously removed records. It seems like the removed records are being persisted somewhere, but not in the PDS, although it is the PDS that is returning them.

Steps to Reproduce

  1. Use the getFollows API to fetch the follows for a user:

curl 'https://pds.bsky.sats4.life/xrpc/app.bsky.graph.getFollows?actor=did:plc:f6beqf2stqdl34t5nr4mlodp' -H "Authorization: Bearer $JWT_AUTH" | jq '.follows'

  1. Check that the response is returning many follows.
  2. Verify that the follows do not exist on the PDS through https://atproto-browser.vercel.app/at/did:plc:f6beqf2stqdl34t5nr4mlodp.

Expected behavior
The getFollows response should contain only the actual follows.

Actual Behavior
The getFollows response is returning the actual follows, plus many other follows that are not present on the PDS.

Details

  • Operating system: Ubuntu
  • PDS version: latest - 3.9 (as found on compose.yaml)

Bug Demo
https://drive.proton.me/urls/FV04R1BMDC#RNEvKfy1INtt

PS: this is a repost of this post on atproto repo issue #3256.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions