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

Maxim Muzafarov updated IGNITE-12183:
-------------------------------------
    Description: 
Currently, `onRebalanceKeyReceived` metric is treated as CacheMetric, but, for 
example, calculated for the whole cache group for historical rebalance (see 
IGNITE-11330 and code block comment below). So, it is not actually working as 
CacheMetric. We should move it to the cache group level.

Also, such metrics `EstimatedRebalancingKeys`, `RebalancedKeys`, 
`RebalancingKeysRate` can be available without enabling cache statistics.


{code}
    /**
     * Update rebalancing metrics.
     */
    private void updateGroupMetrics() {
        // TODO: IGNITE-11330: Update metrics for touched cache only.
        // Due to historical rebalancing "EstimatedRebalancingKeys" metric is 
currently calculated for the whole cache
        // group (by partition counters), so "RebalancedKeys" and 
"RebalancingKeysRate" is calculated in the same way.
        for (GridCacheContext cctx0 : grp.caches()) {
            if (cctx0.statisticsEnabled())
                cctx0.cache().metrics0().onRebalanceKeyReceived();
        }
    }
{code}

  was:
Currently, `onRebalanceKeyReceived` metric is treated as CacheMetric, but, for 
example, calculated for the whole cache group for historical rebalance (see 
IGNITE-11330 and code block comment below). We should move it to the cache 
group level.

{code}
    /**
     * Update rebalancing metrics.
     */
    private void updateGroupMetrics() {
        // TODO: IGNITE-11330: Update metrics for touched cache only.
        // Due to historical rebalancing "EstimatedRebalancingKeys" metric is 
currently calculated for the whole cache
        // group (by partition counters), so "RebalancedKeys" and 
"RebalancingKeysRate" is calculated in the same way.
        for (GridCacheContext cctx0 : grp.caches()) {
            if (cctx0.statisticsEnabled())
                cctx0.cache().metrics0().onRebalanceKeyReceived();
        }
    }
{code}


> Move rebalanceKeysReceived metric to the cache group level
> ----------------------------------------------------------
>
>                 Key: IGNITE-12183
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12183
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Aleksandr Brazhnikov
>            Assignee: Maxim Muzafarov
>            Priority: Major
>              Labels: IEP-35
>
> Currently, `onRebalanceKeyReceived` metric is treated as CacheMetric, but, 
> for example, calculated for the whole cache group for historical rebalance 
> (see IGNITE-11330 and code block comment below). So, it is not actually 
> working as CacheMetric. We should move it to the cache group level.
> Also, such metrics `EstimatedRebalancingKeys`, `RebalancedKeys`, 
> `RebalancingKeysRate` can be available without enabling cache statistics.
> {code}
>     /**
>      * Update rebalancing metrics.
>      */
>     private void updateGroupMetrics() {
>         // TODO: IGNITE-11330: Update metrics for touched cache only.
>         // Due to historical rebalancing "EstimatedRebalancingKeys" metric is 
> currently calculated for the whole cache
>         // group (by partition counters), so "RebalancedKeys" and 
> "RebalancingKeysRate" is calculated in the same way.
>         for (GridCacheContext cctx0 : grp.caches()) {
>             if (cctx0.statisticsEnabled())
>                 cctx0.cache().metrics0().onRebalanceKeyReceived();
>         }
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to