[
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:41 PM:
-------------------------------------------------------------------
[~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)
was (Author: alexey kuznetsov):
[~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?
> 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)