Details
-
Improvement
-
Status: Accepted
-
Normal
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
-
Coremunity
-
Needs Assessment
Description
Puppet::Confine.valid? ensures that any potentially cached values are reset after each call. We see this pattern in Puppet::Confine::Variable. Unfortunately, valid? is called for each resource instance per https://github.com/puppetlabs/puppet/blob/16220673acaa03f708f6b6410a659b4ba737ab7a/lib/puppet/graph/relationship_graph.rb#L115-L116 and https://github.com/puppetlabs/puppet/blob/16220673acaa03f708f6b6410a659b4ba737ab7a/lib/puppet/confiner.rb#L43-L45 so this would mean that cached values would get reset for every resource instance. Thus, they would not persist at the provider level (technically the provider-class level), which is undesirable and defeats the purpose of caching.
We should re-architect how caching works for confinements so that it persists for the entire transaction instead of on every valid? call (i.e. instead of on a per-resource case).
Attachments
Issue Links
- relates to
-
FACT-3001 Debug output shows facter gets called thousands of times
-
- Closed
-