Description
Reference PR - #44670
Comments from @alzimmermsft
- Race conditions in chained polling strategy
Can ChainedPollingStrategy be re-used in multiple locations? If it can, we may need to harden this method to prevent race conditions from happening.
- Revisit polling strategy constructors and order of evaluation of polling strategies
Do we have any concerns with the design of this type? Such as the opinions on which strategy are included here and with which order they are?
- Customizable headers for
OperationResourcePollingStrategy
Why don't we provide a way to set the HTTP header inspected by OperationResourcePollingStrategy in any of these constructor methods?
- PollingContext redesign
Now that we're given a chance to make breaking changes, is there anything we'd want to change about PollingContext? Possibly elevating some key-value pairs in this Map to typed properties on this class?
- Do we need the Poller interface?
Do we need to have an interface and class for implementing polling? Could we instead just use SimplePoller directly in public API?
- Expandable enum caching
If we're not going to cache instance created here we don't really need to use a backing Map to store constants defined by the ExpandableEnum. Rather we could do simple string equivalence checking that'd should be more performant as map usage will require scanning name at least once for its hash to determine the map bucket and zero to a few times to compare it against keys found in the bucket. This logic would be a basic initial check on name.length() matching known lengths, if not matched we know this is new, and then casing on length matches to do direct value comparisons.