-
Improvement
-
Resolution: Done
-
Medium
-
None
-
None
We are currently using ConcurrentMap to track by{Stream,Yang}Augmented. The access pattern is heavily biased towards lookups, which, being concurrent, involve volatile reads.
The only way this map can change is through reloadAugmentations(), hence it would seem we could use either an ImmutableMap or a HashMap with copy-on-write.
Doing so would incur a single volatile read to acquire the map, but the code paths need to be analyzed to make sure reloadAugmentations() does not incur side-effects, leading to re-enters, AB-BA deadlocks or iteration visibility changes.