What's the default limit in RollupMetricSpec

The description for RollupMetricSpec.limit says “Default limit is as set by the database engine i.e. 2000 objects”. Is the default limit configurable? How to find out what is the default limit?

The documentation says the default limit. You can specify limit:-1 in the spec to not have any limit (i.e. all the rollup will be performed for all the objects as returned by the filter criteria). You can alternatively set any other limit and that should be respected

Checkout the documentation on the type c3ShowType(RollupMetricSpec)

  /**
   * If ids is not specified, alternatively a filter could be used to fetch the ids that one is interested in evaluating for a single source type
   * This filter will be applied on the source type and a default limit of 2000 sources will be applied if not otherwise
   * specified using {@link EvalMetricsSpec#limit}. The ids generated as a result of fetch using this filter will be used for
   * evaluation of the metrics. This should not be used to filter values on the results of the time series.
   */
  filter: string

  /**
   * Optionally you can also provide a limit with a filter to limit the number of sources. Default limit is as set by
   * the database engine i.e. 2000 objects
   */
  limit: int

When running a rollup metrics with a filter, (where the number of items matching the filter is around 64,000, I get the following error:

rollup(‘sum’,x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x80, x81, x82, x83,

44, x645, x646, x647, x648, x649, x650, x651, x652, x653, x654, x655, x656, x657, x658, x659, x660, x661, x662, x663, x664, x665, x666, x667, x668, x669, x670, x671, x672, x673, x674, x675, x676, x677, x678, x679, x680, x681, x6…

1, x67402, x67403, x67404, x67405, x67406, x67407, x67408, x67409, x67410, x67411, x67412, x67413, x67414, x67415, x67416, x67417, x67418, x67419, x67420, x67421, x67422)“: Too many function arguments

Which causes it to fail. Any thoughts on how to get around this?

I believe the limit is around 32k because the 20k entity metric rollup is successful. I have a method to resolve this by first doing a fetchCount of the entities in the group, then if it exceeds 20k, do a fetch of the ids in the group, then group into chunks of ids. Then do a rollup metrics for each of these chunks giving the ids array instead of filter string. Once the results are in, use the add() method of time series to add up all the results.

However I hope there might be a better solution.