Make pullers in StatsPullAtomService thread-safe

If statsd times out on a puller before it finishes and then calls
another puller, it is possible for pullers to execute concurrently,
necessitating proper synchronization.

We guard each puller (or a group of pullers that share member variables)
with a lock to fix the synchronizatino issue. This is overly
pessimistic, but ensures correctness.

Test: m
Test: atest CtsStatsdHostTestCases
Bug: 157906917
Change-Id: Ib050b967f0a5ee6936d3a0a384670d5efb331b72
This commit is contained in:
Ruchir Rastogi
2020-06-01 10:43:31 -07:00
parent ca62fc4162
commit bba70a6065