ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Kuznetsov (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-6846) Add metrics for entry processor invocations
Date Fri, 01 Dec 2017 15:41:00 GMT

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

Alexey Kuznetsov edited comment on IGNITE-6846 at 12/1/17 3:40 PM:
-------------------------------------------------------------------

[~vkulichenko]
"8. And once again, it should be consistent with other operations  Invoke is a regular cache
operation; the only difference is that it can do both read and update/remove in one go. Let's
not overcomplicate this."
Imagine, we perform regular get operation.The value would be extracted from near cache on
the same node.As a result 'get' metric would be incremented on local node.

Now, consider performing invoke:
{code:java}
                cache0.invoke(i, new CacheEntryProcessor<Integer, Integer, Object>()
{
                    @Override public Object process(MutableEntry<Integer, Integer> entry,
                        Object... arguments) throws EntryProcessorException {
                        entry.getValue();

                        return null;
                    }
                });
{code}
It would be executed on primary node(a-priory), and 'read-only invoke' metric must be incremented
on primary node only(not on local node!).

So, how could they be consistent with each other? 



was (Author: alexey kuznetsov):
[~vkulichenko] times calculated the same way, by the same method on both client and server.How
it works : we start invoke by sending certain request to primary node and waiting for response.When
response is received we must calculate time, but response message contains no information
about whether it was 'read-only' or 'update' operation. As a result we cannot decide whether
we should increment 'read-only' or 'update' metric.
Solution can be add flag to message.

_"What exactly is non-trivial here?"_
Update is done after receiving update request message.When we got GridDhtAtomicSingleUpdateRequest
on backup node, it contains no entry processor, no info about whether it is invoke or regular
update operation. So we don't know whether it is transformation op or not.
So, should we add some flag into message GridDhtAtomicSingleUpdateRequest  indicating entryProcessor
calculated value ?(there is no other way to implement it)

> 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.4
>
>
> {{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
(v6.4.14#64029)

Mime
View raw message