Skip to content

2.0.0-rc.8 optimistic update keeps waiting after its last async reader unmounts #3426

Description

@GabbeV

Describe the bug

An optimistic update keeps waiting for an async memo after its last reader is unmounted. The equivalent normal signal update releases immediately.

Your Example Website or App

https://s.olid.uk/id/ivHMtOauSn2E1c4bfvpFDg

Steps to Reproduce the Bug or Issue

  1. Wait for initialization.
  2. Click Run.
  3. Details disappears after 500ms, but Value stays 0.
  4. Value becomes 1 when the unused request finishes. The action is still pending.

Expected behavior

I would expect the optimistic update to release when nothing observes the pending work anymore, like a normal signal update.

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Browser: Firefox

Additional context

Possibly related to #3372, fixed by #3392, which wakes a parked transaction when its pending reader is disposed.

This case eventually completes; it does not lose the update as #3372 did. Is keeping the optimistic lane held after disposal intentional, or should it release here too?

Reproduced on next at 1643d2a and #3425 at 9fa294f.

Activity

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