* bugfix: when extend the scope and recommend to start with 10000 or scope greater than 1000 , freemarker generate MetricsMetaInfo method will cause error such as MetricsMetaInfo("xxxx_cpm", 10,001, entityId)
Co-authored-by: jingjiu <jingjiu@tsign.cn>
Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
This commit is contained in:
parent
8bf38cc29c
commit
a80a55589e
|
|
@ -130,7 +130,7 @@ public class MetricsPersistentWorker extends PersistenceWorker<Metrics> {
|
|||
* Hard coded the max size. This is only the batch size of one metrics, too large number is meaningless.
|
||||
*/
|
||||
int maxBatchGetSize = 2000;
|
||||
final int batchSize = Math.max(maxBatchGetSize, lastCollection.size());
|
||||
final int batchSize = Math.min(maxBatchGetSize, lastCollection.size());
|
||||
List<Metrics> metricsList = new ArrayList<>();
|
||||
for (Metrics data : lastCollection) {
|
||||
transWorker.ifPresent(metricsTransWorker -> metricsTransWorker.in(data));
|
||||
|
|
|
|||
Loading…
Reference in New Issue