Pierre Villard created NIFI-14014:
-------------------------------------

             Summary: Metrics endpoints may return data for "dead" instance IDs
                 Key: NIFI-14014
                 URL: https://issues.apache.org/jira/browse/NIFI-14014
             Project: Apache NiFi
          Issue Type: Improvement
          Components: Core Framework
            Reporter: Pierre Villard
            Assignee: Pierre Villard


During the lifecycle of a NiFi node, the instance ID may change. In particular, 
when a node starts, it gets a random UUID assigned as instance ID:

[https://github.com/apache/nifi/blob/rel/nifi-2.0.0/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java#L631]
 

but this instance ID will change when the node is joining the cluster:

[https://github.com/apache/nifi/blob/rel/nifi-2.0.0/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java#L2746-L2748]

If the metrics endpoints are called before the instance ID changes, then some 
Gauges (JVM metrics, cluster metrics, storage metrics, etc) will get populated 
with the initial instance ID for the instance label. Subsequent calls to the 
endpoints (when the clustered Instance ID is set) will return data for the old 
instance ID as well as the new instance ID.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to