See #414 for motivation behind commits 65b622c, f0747ba, 12e35a8.
These commits introduced an issue where if two processes working in parallel generated the same function in different cache modules, our assumptions about the module -> function mapping would break and the functions would not be properly linked. (Previously this would be dealt with by marking one of the modules invalid). Commit ffd7492 handles this by maintaining a function name and a (realized name / link name / instance name), and using the latter internally.
Approach
Key approach here was ensuring that the concept of a link name did not leak outside the cache - cache users should not need to have any notion of which modules a given function is in.
How Has This Been Tested?
We use a MockDirectory class (written by @guslonergan ) to generate versions of the cache with multiple modules containing the same function, approximating the state of the cache following a race.
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist:
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
Motivation and Context
See #414 for motivation behind commits 65b622c, f0747ba, 12e35a8.
These commits introduced an issue where if two processes working in parallel generated the same function in different cache modules, our assumptions about the module -> function mapping would break and the functions would not be properly linked. (Previously this would be dealt with by marking one of the modules invalid). Commit ffd7492 handles this by maintaining a function name and a (realized name / link name / instance name), and using the latter internally.
Approach
Key approach here was ensuring that the concept of a link name did not leak outside the cache - cache users should not need to have any notion of which modules a given function is in.
How Has This Been Tested?
We use a MockDirectory class (written by @guslonergan ) to generate versions of the cache with multiple modules containing the same function, approximating the state of the cache following a race.
Types of changes
Checklist: