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

go/cmd: Audit and fix context.Background() usage #15928

Merged
merged 2 commits into from
May 15, 2024

Commits on May 14, 2024

  1. go/cmd: Audit and fix context.Background() usage

    This removes a bunch of the context.Background() usage for the command
    line entrypoints. In general, we should use the command context (which
    normally is context.Background(), but it's more semantically accurate).
    
    There's a few cases where we need more fixes. Specifically in vtgate
    where we want to setup a cancellable context and cancel it when we shut
    down. This is the one that ends up running things like the topo watcher
    and this ensures things are closed appropriately.
    
    Similarly in vtcombo we apply similar fixes so that we always correctly
    cancel the context on shutdown and the same for vttablet.
    
    Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
    dbussink committed May 14, 2024
    Configuration menu
    Copy the full SHA
    69b352d View commit details
    Browse the repository at this point in the history
  2. Add comments

    Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
    dbussink committed May 14, 2024
    Configuration menu
    Copy the full SHA
    cf32fe9 View commit details
    Browse the repository at this point in the history