Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-31673

Fix StreamWorkManager running threads metric

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2023.0, 2021.34
    • Component/s: Streams

      Description

      The running thread metric is an estimation between the lag and the number of partitions of the stream:
      https://github.com/nuxeo/nuxeo/blob/2021/modules/core/nuxeo-core-event/src/main/java/org/nuxeo/ecm/core/work/StreamWorkManager.java#L521

      But the number of partition is missing the namespace, as the result it uses the defaultPartitions (4).

      Also, because of the missing namespace, WorkManager queue identifier that contains an hyphen (like foo-bar below) will raise an exception:

      2023-02-12T00:00:00,383 WARN  [prometheus-http-1-5] [io.opencensus.exporter.metrics.util.MetricReader] Exception thrown by the metrics exporter.
      java.lang.IllegalArgumentException: Invalid name without namespace: 'foo-bar'
              at org.nuxeo.lib.stream.log.Name.checkLogNameWithoutNamespace(Name.java:129) ~[nuxeo-stream-2021.29.7.jar:?]
              at org.nuxeo.lib.stream.log.Name.<init>(Name.java:60) ~[nuxeo-stream-2021.29.7.jar:?]
              at org.nuxeo.lib.stream.log.Name.ofUrn(Name.java:78) ~[nuxeo-stream-2021.29.7.jar:?]
              at org.nuxeo.lib.stream.computation.Settings.getPartitions(Settings.java:151) ~[nuxeo-stream-2021.29.7.jar:?]
              at org.nuxeo.ecm.core.work.StreamWorkManager.getMetrics(StreamWorkManager.java:521) ~[nuxeo-core-event-2021.30.14.jar:?]
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: