• Yorick Peterse's avatar
    Dynamically read pool sizes for LB configurations · 4082c09a
    Yorick Peterse authored
    In various places we update the pool size to use for the database, then
    reconnect. The global instance of
    Gitlab::Database::LoadBalancing::Configuration is memoized, and may be
    read before the pool size is updated. This can result in the pool size
    being out of date, if database.yml uses a value different from the one
    GitLab wants.
    
    To work around this, LoadBalancing::Configuration#pool_size now always
    reads the value from the underlying model. All other LB settings are
    still persisted in-memory, as we don't support changing these at runtime
    anyway.
    
    Changelog: fixed
    4082c09a
configuration_spec.rb 5.18 KB