Skip to content

Investigate environment lock contention under parallel deploys #7971

Description

@jongio

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/environmentEnvironment management, .env filesarea/provisioningBicep/Terraform/ADE provisioningenhancementNew feature or improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions