Description of changes: Address an issue where parallel service calls within the same server request could cause the application to crash due to mutation of RetriableOutwardsRequestLatencyAggregator's internal mutable state from multiple threads. This change is non-breaking and adds additional functions to the OutwardsRequestAggregator protocol with default implementations. The new implementations in RetriableOutwardsRequestLatencyAggregator use a dispatch queue to serialise access to the class' mutable state. The existing methods have been marked as deprecated due to the likelihood that they will not be thread safe.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue #, if available:
Description of changes: Address an issue where parallel service calls within the same server request could cause the application to crash due to mutation of
RetriableOutwardsRequestLatencyAggregator
's internal mutable state from multiple threads. This change is non-breaking and adds additional functions to theOutwardsRequestAggregator
protocol with default implementations. The new implementations inRetriableOutwardsRequestLatencyAggregator
use a dispatch queue to serialise access to the class' mutable state. The existing methods have been marked as deprecated due to the likelihood that they will not be thread safe.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.