[ 
https://issues.apache.org/jira/browse/IGNITE-28003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ilya Korol updated IGNITE-28003:
--------------------------------
    Description: 
Metric source {{<partition.states.zone.X.table.Y>}} is reported as *disabled* 
in {{node metric source list}} output right after node startup, while in fact 
it's enabled (you can enabled JMX exporter and see it).

Looks like it's due to bug with enabled field in `PartitionStatesMetricSource`. 
We don't set it to true anywhere so it's {{false}} by default and when we call 
enable() method we skip initial condition:

{code:java}
@Override
public synchronized @Nullable MetricSet enable() {
    if (enabled) {  // this condition is a bit contrintuitive. I guess we 
should expect geting MetricSet instead of null when metric source is enabled
        return null;
    }

    ...
}

@Override
public synchronized boolean enabled() {
    return enabled; // always false
}
{code}

P.S. I assume that some users might have already use those metrics in their 
monitoring (i.e. in Grafana Dashboards), so we have to keep them enabled by 
default.


  was:
Metric source {{<partition.states.zone.X.table.Y>}} is reported as *disabled* 
in {{node metric source list}} output right after node startup, while in fact 
it's enabled (you can enabled JMX exporter and see it).

Looks like it's due to bug with enabled field in `PartitionStatesMetricSource`. 
We don't set it to true anywhere so it's {{false}} by default and when we call 
enable() method we skip initial condition:

{code:java}
@Override
public synchronized @Nullable MetricSet enable() {
    if (enabled) {  // this condition is a bit contrintuitive. I guess we 
should expect geting MetricSet instead of null when metric source is enabled
        return null;
    }

    ...
}

@Override
public synchronized boolean enabled() {
    return enabled; // always false
}
{code}

P.S. Condition



> Partition states metric source listed as disabled while it's not
> ----------------------------------------------------------------
>
>                 Key: IGNITE-28003
>                 URL: https://issues.apache.org/jira/browse/IGNITE-28003
>             Project: Ignite
>          Issue Type: Bug
>          Components: metrics ai3, storage engines ai3
>    Affects Versions: 3.1
>            Reporter: Ilya Korol
>            Priority: Major
>
> Metric source {{<partition.states.zone.X.table.Y>}} is reported as *disabled* 
> in {{node metric source list}} output right after node startup, while in fact 
> it's enabled (you can enabled JMX exporter and see it).
> Looks like it's due to bug with enabled field in 
> `PartitionStatesMetricSource`. We don't set it to true anywhere so it's 
> {{false}} by default and when we call enable() method we skip initial 
> condition:
> {code:java}
> @Override
> public synchronized @Nullable MetricSet enable() {
>     if (enabled) {  // this condition is a bit contrintuitive. I guess we 
> should expect geting MetricSet instead of null when metric source is enabled
>         return null;
>     }
>     ...
> }
> @Override
> public synchronized boolean enabled() {
>     return enabled; // always false
> }
> {code}
> P.S. I assume that some users might have already use those metrics in their 
> monitoring (i.e. in Grafana Dashboards), so we have to keep them enabled by 
> default.



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

Reply via email to