Skip to content

Fetch senders missing from the cache #143

Closed

Description

@neoromantic

Messages whose sender has no row in users_cache are indexed and shown with the sender's numeric ID only: sender:name misses them and tg messages shows no name. Until 0.9.0 the daemon didn't cache the senders of history pages (#126), so caches synced earlier keep such messages. On a real cache of about 1.2M messages, about 3% of the messages (from about 3,000 senders) had no sender row after 0.10.0.

Proposed: the daemon finds senders referenced by cached messages but missing from users_cache and fetches them at low priority (for example users.getUsers with the peer from a message, or re-reading one history page that contains the sender), in batches, read-only towards Telegram and within the pacing (#133). Since #93, a sender row that arrives later re-indexes their messages by itself.

Done when a test with a fake client fills the missing senders of an old cache and finds their messages by name, and tg status shows how many senders are still missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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