Fix PullUidProvider unregistering on config update
Previously, MetricsManagers would unregister themselves as a PullUidProvider for a given ConfigKey in the destructor. This caused all pulls to fail after a config update because the new MetricsManager would register itself before the old MetricsManager was destructed and unregistered. This resulted in the old MetricsManager removing the new config since they shared the same config key. The fix is for the PullerManager to check that the PullUidProviders are equal in the unregister function before actually erasing it. Test: bit statsd_test:* (wrote a failing test that now passes). Test: statsd_localdrive to manually update a config, ensured pulls still worked. Bug: 154544328 Change-Id: Id7af3b3b407e24bee74fc34bd1c2b9e0575e9c9e
Loading
Please register or sign in to comment