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

fix race condition in build wait timers for substantiated workers #6344

Merged
merged 1 commit into from
Jan 31, 2022

Commits on Jan 31, 2022

  1. latent: Remove erroneous build wait timer setup in substantiate()

    Calling _setBuildWaitTimer() here in substantiate() may cause the worker
    to be insubstantiated later while build is running. Three places where
    the timer is reset are _setBuildWaitTimer() itself, stopService() and
    buildStarted(). The first two are not interesting and buildStarted() has
    already been called for a particular build when we are in
    substantiate():
    
    - buildStarted() is called via WorkerForBuilder.buildStarted() which is
    called from Builder._startBuildFor()
    - substantiate() is called via
    LatentWorkerForBuilder.substantiate_if_needed() via Build.startBuild()
    from Builder._startBuildFor().
    
    Once the current build is finished for any reason, _setBuildWaitTimer()
    will be called from buildFinished(). Thus calling _setBuildWaitTimer()
    from substantiate() is not needed.
    
    Commit adjusted by: Povilas Kanapickas <povilas@radix.lt>
    Ryan-Draves authored and p12tic committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    1592ac2 View commit details
    Browse the repository at this point in the history