OSDN Git Service

Fixes statsd returning too much data at once.
authorDavid Chen <dwchen@google.com>
Thu, 3 May 2018 17:29:11 +0000 (10:29 -0700)
committerYao Chen <yaochen@google.com>
Sat, 5 May 2018 00:09:16 +0000 (17:09 -0700)
commit48944901f7e6334724efadda6c6b27d9e88fc9e2
tree10a4c19530b68bd17727694622f3d712c74aeae4
parent11969b49191cfa156ada8d5034d5d39c2b77dc69
Fixes statsd returning too much data at once.

We observe a single ConfigMetricsReportList can be greater than the
safe size for the binder transaction buffer since we only check the
size of the current metrics in progress, but we also return the
previous reports stored on disk.

This change will attempt to send another ConfigMetricsReportList
as soon as possible if there's already a report on disk.

Also fixes a bug when trying to trigger data fetch before the client
has registered the corresponding dataFetchOperation.

Bug: 79201869
Test: Tested manually on marlin-eng
Change-Id: I2d3677162804a27e7a7a95d482d80c46bd994a67
cmds/statsd/benchmark/metric_util.cpp
cmds/statsd/src/StatsLogProcessor.cpp
cmds/statsd/src/StatsLogProcessor.h
cmds/statsd/src/StatsService.cpp
cmds/statsd/src/metrics/MetricsManager.cpp
cmds/statsd/src/metrics/MetricsManager.h
cmds/statsd/src/storage/StorageManager.cpp
cmds/statsd/src/storage/StorageManager.h
cmds/statsd/tests/StatsLogProcessor_test.cpp
cmds/statsd/tests/UidMap_test.cpp
cmds/statsd/tests/statsd_test_util.cpp