Azure / Azure/azure-dev

Investigate environment lock contention under parallel deploys

Open
#7,971 0 comments 0 reactions 0 assignees View on GitHub
area/environment area/provisioning enhancement
Dominant language
Go
Stars
569
Forks
364
Avg merge
2d 19h
Merged PRs (30d)
136

Description

## Context

Follow-up from PR #7776 (exegraph) review - wbreza Pass 3, finding M4.

## Problem

Every Getenv/LookupEnv call in pkg/environment/environment.go acquires mu.RLock individually. Under 30+ concurrent goroutines (e.g. parallel service deploys all reading env vars), this may become measurable contention.

## Acceptance Criteria

- [ ] Profile env read contention under realistic parallel workloads (30+ goroutines)
- [ ] If measurable: consider batching reads, sync.Map, or snapshot-on-write pattern
- [ ] If not measurable: close as won't-fix with profiling evidence

## Notes

Not catastrophic - current impl is correct. This is a performance investigation, not a correctness fix.

## Related

- PR #7776 (exegraph engine)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.