Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b73ccad authored by Yao Chen's avatar Yao Chen
Browse files

Urgent fix. Once UidMap size exceeds the limit, statsd triggers data drop every time a log comes in

Test: manual
Change-Id: Idf93e5aca19b80acf964670fa4bc9f1f0781df1f
parent 456385cb
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -84,10 +84,12 @@ void StatsLogProcessor::onAnomalyAlarmFired(
void StatsLogProcessor::OnLogEvent(const LogEvent& msg) {
    StatsdStats::getInstance().noteAtomLogged(msg.GetTagId(), msg.GetTimestampNs() / NS_PER_SEC);
    // pass the event to metrics managers.
    for (auto& pair : mMetricsManagers) {
        pair.second->onLogEvent(msg);
        flushIfNecessary(msg.GetTimestampNs(), pair.first, pair.second);
    }
    // TODO: THIS CHECK FAILS BECAUSE ONCE UIDMAP SIZE EXCEEDS LIMIT, DROPPING METRICS DATA
    // DOESN'T HELP. FIX THIS.
    //for (auto& pair : mMetricsManagers) {
    //    pair.second->onLogEvent(msg);
    //    flushIfNecessary(msg.GetTimestampNs(), pair.first, pair.second);
    //}

    // Hard-coded logic to update the isolated uid's in the uid-map.
    // The field numbers need to be currently updated by hand with atoms.proto