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

Refactor Metrics collection to be deterministic and complete

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None
    • None

      MetricsCollector misbehaves when all VariantMetricInformation are processed before all BatchLoaded or AllBatchesLoaded events are de-queued.

      In that case, following checks are never performed: totalBatches == servedBatches and serverVariants == totalVariants.

      In that case, VariantCompleted and PushMessageCompleted events are never fired and PushMessageInformation#servedVariants counter is never equal to PushMessageInformation#totalVariants (which is why UI still shows message is Pending).


      There are two solutions:

      1) -schedule (or somehow else trigger) collector of BatchLoaded / AllBatchesLoaded events,-

      2) refactor metric collection logic so that it is triggered externally in cycles until everything is processed

      • this involves new TriggerMetricCollectionQueue that is used to store a "request for metrics processing"
      • will allow us to update metrics more efficiently since one update cycle will cover not only several BatchLoaded events but also several VariantMetricInformation events

      See diagram for more clarity: https://docs.google.com/drawings/d/12cUrYf7ACLYEoYsIWul2szN3lmQcYFMjjaZDq2fr9qQ/edit?usp=sharing

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

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 3 hours
                  3h
                  Remaining:
                  Remaining Estimate - 3 hours
                  3h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified