-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
None
PushMessage's servedVariants < totalVariants even though all variants have serverBatches == totalBatches.
This is caused by the counting logic here: https://github.com/aerogear/aerogear-unifiedpush-server/blob/1.1.0-beta.4/push/sender/src/main/java/org/jboss/aerogear/unifiedpush/message/MetricsCollector.java#L96-L107
and can be reproduced with a modified test here: https://gist.github.com/lfryc/12638f604fe567475a67#file-testmetricscollector-java-L129-L172
Notice that collectMetrics is invoked before sending events:
metricsCollector.collectMetrics(variant1Metric1); metricsCollector.collectMetrics(variant1Metric2); metricsCollector.collectMetrics(variant2Metric1); send(batchLoadedQueue, new BatchLoadedEvent(variantID1), variantID1); send(allBatchesLoaded, new AllBatchesLoadedEvent(variantID1), variantID1);
The best resolution is described here: AGPUSH-1512
But as a temporary workaround, we could make client to do the math and recount variants that have servedBatches == totalBatches as well as number of receivers.
- is related to
-
AEROGEAR-6124 Refactor Metrics collection to be deterministic and complete
- Resolved