DataSources: Add mutex to provisioning step (#106921)

add mutex to ds provisioning
This commit is contained in:
Will Browne
2025-06-18 16:34:40 +01:00
committed by GitHub
parent c6ee26b459
commit 05b458741e
@@ -244,6 +244,8 @@ func (ps *ProvisioningServiceImpl) Run(ctx context.Context) error {
}
func (ps *ProvisioningServiceImpl) ProvisionDatasources(ctx context.Context) error {
ps.mutex.Lock()
defer ps.mutex.Unlock()
datasourcePath := filepath.Join(ps.Cfg.ProvisioningPath, "datasources")
if err := ps.provisionDatasources(ctx, datasourcePath, ps.datasourceService, ps.correlationsService, ps.orgService); err != nil {
err = fmt.Errorf("%v: %w", "Datasource provisioning error", err)