Skip to content

Peer sync downgrades still-withheld mirrors to Plain on a transient withheld-paths error #48

Closed

Description

@beardthelion

Surfaced by CodeRabbit on #46 (review spans the full stack; this is peer-sync code from #35).

In sync.rs the per-repo sync does:

let withheld = fetch_withheld(client, &origin_url, owner_short, repo_name).await;
let mode = classify_mirror(withheld);

fetch_withheld collapses 404, 5xx, network errors, and parse failures all into None, and classify_mirror(None) yields MirrorMode::Plain. For an existing promisor mirror that flows into fetch_repo(.., Plain), which clears remote.origin.promisor and remote.origin.partialclonefilter before refetching. So a transient withheld-paths outage against a still-withheld repo downgrades the mirror to a full clone and starts failing syncs until the endpoint recovers.

Only downgrade to Plain on a definite Some(empty). When the lookup is unknown (None from an error), preserve the repo's existing promisor/partial-clone mode instead of reclassifying.

Owning PR: #35.

Activity

  1. added
    kind:bug
    crate:node
    subsystem:replication
    subsystem:visibility
    sev:high
    on Jun 22, 2026
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

    crate:nodekind:bugsev:highsubsystem:replicationsubsystem:visibility

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions