Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-6072

UPS Console shows Pending - because servedVariants < totalVariants

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major 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.

            lfryc Lukáš Fryč (Inactive)
            lfryc Lukáš Fryč (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: