Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-391

Reconsider augmentation tracking in DataObjectCodecContext

XMLWordPrintable

      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.

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: