Skip to content

Reduce duplicate GitHub totals queries during open-data backfill #1855

Description

@oktofeesh1

Summary

Self-hosted open-data backfill can repeat the same GitHub GraphQL totals query across enqueue attempts and segment workers for a repository. During scheduled or manual backfill bursts, those repeated totals lookups add avoidable API pressure before each segment does its own work.

Desired outcome

Reuse fresh persisted totals snapshots for backfill planning, keep a valid same-source stale snapshot as a fallback when live refresh fails, and coalesce concurrent live totals refreshes for the same repository/source.

Impact

This should reduce duplicate GitHub GraphQL calls during backfill bursts, lower rate-limit risk for self-hosted installations, and keep segment expected-count decisions conservative when GitHub is unavailable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions