Skip to content

fix: chain fallback loop processes redundant packages after full package fallback #527

@JusterZhu

Description

@JusterZhu

Description

When a chain update package fails and falls back to a full replacement package, the AbstractStrategy.ExecuteAsync loop continues processing remaining chain packages whose versions are ≤ the fallback version. Each one independently re-triggers the same full-package fallback, resulting in redundant decompression and pipeline execution.

For example, with versions [1.1.0 (chain), 2.0.0 (chain), 3.0.0 (chain)] and a full package F_v3.0.0:

  1. v1.1.0 chain fails → fallback to F_v3.0.0 → already at v3.0.0
  2. v2.0.0 chain fails → fallback to F_v3.0.0 again → redundant
  3. v3.0.0 chain fails → fallback to F_v3.0.0 again → redundant

Expected Behavior

After a full-package fallback, subsequent chain packages with version ≤ the fallback version should be skipped.

Fix

PR #526 introduces:

  1. FallbackFullVersion property in VersionEntry and DownloadAsset
  2. Populate it in DownloadPlanBuilder from the matching full package
  3. Track fallbackEffectiveVersion in AbstractStrategy.ExecuteAsync
  4. Skip chain packages where version ≤ fallbackEffectiveVersion

This ensures that once a full package brings the application to version X, all chain packages ≤ X are skipped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions