[ 
https://issues.apache.org/jira/browse/IGNITE-6846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16463416#comment-16463416
 ] 

Alexey Kuznetsov edited comment on IGNITE-6846 at 5/4/18 6:22 AM:
------------------------------------------------------------------

[~vkulichenko] Thanks for review.

> What is DHT_ATOMIC_TRANSFORM_OP_FLAG_MASK and why is it introduced?

This flag indicates value was updated by EP(entry processor), so EP metrics 
could be updated on backup nodes.

When value is changed we don't know whether it was changed by EP or not.
Look at example, illustrating it : 
GridCacheNearMetricsSelfTest#testCreateReadRemoveInvokesFromPrimary.
In this test single value is changed by EP in _setValue1ByEntryProcessor_. 
At first step key is updated on node0, then it must be propagated to backup 
node by _GridDhtAtomicSingleUpdateRequest_  message. When backup node receives 
this message, we don't know whether update was a result of EP invocation or 
not, so we cannot increment EP metrics correctly on backup node.

PS, we cannot put EP into GridDhtAtomicSingleUpdateRequest#entryProcessor.

This flag do change message, but I don't thing it brake something.


was (Author: alexey kuznetsov):
[~vkulichenko] Thanks for review.

> What is DHT_ATOMIC_TRANSFORM_OP_FLAG_MASK and why is it introduced?

This flag indicates value was updated by EP(entry processor), so EP metrics 
could be updated on backup nodes.
When value is changed we don't know whether it was changed by EP or not.
Look at example, illustrating it : 
GridCacheNearMetricsSelfTest#testCreateReadRemoveInvokesFromPrimary.
In this test single value is changed by EP in _setValue1ByEntryProcessor_. 
At first step key is updated on node0, then it must be propagated to backup 
node by _GridDhtAtomicSingleUpdateRequest_  message. When backup node receives 
this message, we don't know whether update was a result of EP invocation or 
not, so we cannot increment EP metrics correctly on backup node.

PS, we cannot put EP into GridDhtAtomicSingleUpdateRequest#entryProcessor.

This flag do change message, but I don't thing it brake something.

> Add metrics for entry processor invocations
> -------------------------------------------
>
>                 Key: IGNITE-6846
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6846
>             Project: Ignite
>          Issue Type: Improvement
>          Components: cache
>    Affects Versions: 2.3
>            Reporter: Valentin Kulichenko
>            Assignee: Alexey Kuznetsov
>            Priority: Critical
>              Labels: iep-6
>             Fix For: 2.6
>
>
> {{CacheMetrics}} object has multiple metrics for various cache operations 
> like {{get}}, {{put}} and {{remove}}, but nothing for 
> {{invoke}}/{{EntryProcessor}}. It makes sense to add such metrics, for 
> example:
> * Total number of `invoke` operations executed.
> * Number of `invoke` operations that included updates.
> * Number of read-only `invoke` operations.
> * Min/max/avg execution time.
> * ...



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to