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

🐛 Manager.Elected() should beclosed after runnables are started #1354

Merged

Commits on Jan 21, 2021

  1. 🐛 Manager.Elected() should beclosed after runnables are started

    During debugging a weird issue with some tests failing if they were
    running too fast. In other words, calling Start() and Close() on
    a manager too fast throws an error where the informers haven't been able
    to sync, which then makes Start() fail with an error.
    
    In an effort to improve this behavior, tried to use Elected() to wait
    for leader election to start, which also waits for the cache.
    
    During some debugging, this issue happened again and upon digging a bit
    more it seems that the channel was closed before starting the runnables
    in some cases.
    
    This change reorders the close on cm.elected, which should fix the above
    issue.
    
    Signed-off-by: Vince Prignano <vincepri@vmware.com>
    vincepri committed Jan 21, 2021
    Copy the full SHA
    c9e1c10 View commit details
    Browse the repository at this point in the history