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

server: remove contention event registry from baseStatusServer #75835

Merged
merged 1 commit into from
Feb 3, 2022

Commits on Feb 2, 2022

  1. server: remove contention event registry from baseStatusServer

    Previously, baseStatusServer holds a reference to contention.Registry.
    This reference of contention.Registry is used to power the
    /ListContentionEvents endpoint. However, this is not ideal for two
    reasons:
    1. baseStatusServer already holds a reference to *server.SQLServer,
       which in turn contains contention.Registry through its ExecutorConfig
       field. This means that there's no good reason to have another field
       in baseStatusServer to hold this additional reference.
    2. The ongoing contention event registry work will make contention
       registry depend on status server to perform transaction ID resolution
       protocol. As it stand today, the status server's construction depends
       on the creation of contention.Registry. By introducing transaction ID
       resolution protocol into contention.Registry, we will be introducing
       a cyclical reference, which can lead to ugly API design.
    
    This commit removes the baseStatusServer's reference on
    contention.Registry, and instead directly fetching from executor config.
    
    Release note: None
    Azhng committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    39690fc View commit details
    Browse the repository at this point in the history