Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Fix race condition between interleaved and non-interleaved updates #24353

Merged
merged 2 commits into from Apr 12, 2022

Commits on Apr 12, 2022

  1. Regression test: Interleaved update race condition

    Demonstrates the bug reported in facebook#24350.
    acdlite committed Apr 12, 2022
    Copy the full SHA
    f05029d View commit details
    Browse the repository at this point in the history
  2. Bugfix: Last update wins, even if interleaved

    "Interleaved" updates are updates that are scheduled while a render is
    already in progress. We put these on a special queue so that they don't
    get processed during the current render. Then we transfer them to
    the "real" queue after the render has finished.
    
    There was a race condition where an update is received after the render
    has finished but before the interleaved update queue had been
    transferred, causing the updates to be queued in the wrong order.
    
    The fix I chose is to check if the interleaved updates queue is empty
    before adding any update to the real queue. If it's not empty, then
    the new update must also be treated as interleaved.
    acdlite committed Apr 12, 2022
    Copy the full SHA
    c372d03 View commit details
    Browse the repository at this point in the history