Skip to content

[Bug]: AutoRefreshOnObservable produces refreshes for immediately-removed items #1099

Closed

Description

@JakenVeina

Feeding the following sequence of changesets into .AutoRefreshOnObservable() (for the cache version, the list version doesn't seem to have this issue, it just emits an empty changeset), when the refresh observable emits a value immediately upon subscription, results in the following downstream sequence changesets, which includes an invalid Refresh for an item that was previously removed from the collection.

Upstream

2 Changes
    Add #1
    Remove #1

Downstream

2 Changes
    Add #1
    Remove #1
1 Change
    Refresh #1

If the upstream changeset is split up to have the Add and Remove be in separate changesets, there is no issue, as follows:

Upstream

1 Change
    Add #1
1 Change
    Remove #1

Downstream

1 Change
    Add #1
1 Change
    Refresh #1
1 Change
    Remove #1

This doesn't seem to be an issue with any of the operators used internally within AutoRefreshOnObservable() (E.G. .MergeMany() and .SubscribeMany()), but with the sequencing of subscriptions within .AutoRefresh() itself.

I discovered this while expanding our testing suite for .FilterOnObservable(), which ends up occasionally including items in its downstream that were removed upstream.

Activity

  1. added 4 commits that reference this issue on May 29, 2026
    3450986
    ada5983
    e57d6d3
    ef204b5
  2. added a commit that references this issue on May 30, 2026
    3de2fad
  3. added 3 commits that reference this issue on Jun 1, 2026
    524baf7
    51fdc6b
    058754e
  4. added a commit that references this issue on Oct 13, 2026
    bbf7a40
  5. JakenVeina commented on Oct 14, 2026

    @JakenVeina
    CollaboratorAuthor

    Should be fixed now in 9.5.

  6. github-actions commented on Oct 28, 2026

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  7. locked as resolved and limited conversation to collaborators on Oct 28, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址