Previously, the mongodb storage driver an aggregation pipeline
over the meter collection in order to construct a list of resources
adorned with first & last sample timestamps etc.
However mongodb aggregation framework performs sorting in-memory,
in this case operating over a potentially very large collection.
It is also hardcoded to abort any sorts in an aggregation pipeline
that will consume more than 10% of physical memory, which is
observed in this case.
Now, we avoid the aggregation framework altogether and instead
use an equivalent map-reduce.
Reviewed: https:/ /review. openstack. org/65962 /git.openstack. org/cgit/ openstack/ ceilometer/ commit/ ?id=ba6641afacf c52e7391d209575 1ee96d62a64c25
Committed: https:/
Submitter: Jenkins
Branch: master
commit ba6641afacfc52e 7391d2095751ee9 6d62a64c25
Author: Eoghan Glynn <email address hidden>
Date: Thu Jan 9 16:30:10 2014 +0000
Replace mongo aggregation with plain ol' map-reduce
Fixes bug 1262571
Previously, the mongodb storage driver an aggregation pipeline
over the meter collection in order to construct a list of resources
adorned with first & last sample timestamps etc.
However mongodb aggregation framework performs sorting in-memory,
in this case operating over a potentially very large collection.
It is also hardcoded to abort any sorts in an aggregation pipeline
that will consume more than 10% of physical memory, which is
observed in this case.
Now, we avoid the aggregation framework altogether and instead
use an equivalent map-reduce.
Change-Id: Ibef4a95acada41 1af385ff75ccb36 c5724068b59