mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
chore: use database in current context for file cache (#18490)
Using the db.Store when in a TX causes a deadlock for dbmem. In production, this can cause a deadlock if at the current conn pool limit.
This commit is contained in:
@ -574,7 +574,7 @@ func New(options *Options) *API {
|
||||
TemplateScheduleStore: options.TemplateScheduleStore,
|
||||
UserQuietHoursScheduleStore: options.UserQuietHoursScheduleStore,
|
||||
AccessControlStore: options.AccessControlStore,
|
||||
FileCache: files.NewFromStore(options.Database, options.PrometheusRegistry, options.Authorizer),
|
||||
FileCache: files.New(options.PrometheusRegistry, options.Authorizer),
|
||||
Experiments: experiments,
|
||||
WebpushDispatcher: options.WebPushDispatcher,
|
||||
healthCheckGroup: &singleflight.Group[string, *healthsdk.HealthcheckReport]{},
|
||||
|
Reference in New Issue
Block a user