Files
opentf/internal/instances
Martin Atkins 4cca9f1611 instances: Fix data race in GetDeepestExistingModuleInstance
All of the exported querying methods of Expander are supposed to hold a
read lock whenever they Expander.exps, but this particular method was
missing those calls and so it could potentially race with calls that write
new expansions into the data structure.

This seems to be quite hard to hit in practice because it can only arise
if you have an "orphan" resource instance whose node happens to execute
concurrently with the expansion node for a module or resource, but
the race detector can sometimes catch it when executing
TestContext2Apply_providerModuleIteration/apply_orphan_destroy from
"package tofu".

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2026-04-07 14:13:51 -04:00
..
2024-02-08 09:48:59 +00:00
2024-02-08 09:48:59 +00:00