You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vyacheslav Koptilin (Jira)" <ji...@apache.org> on 2021/11/22 15:00:00 UTC
[jira] [Commented] (IGNITE-15666) The remove metric value is different for sync and async methods
[ https://issues.apache.org/jira/browse/IGNITE-15666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17447457#comment-17447457 ]
Vyacheslav Koptilin commented on IGNITE-15666:
----------------------------------------------
Hell [~NSAmelchev], [~PetrovMikhail],
It seems to me, this fix is arguable and contradicts the specification JCache API.
In accordance with specification *12.4. Statistics Effects of Cache Operations* the `remove(K key)` method should update statistics _if the method returns true._ Yep, it explicitly mentions the "Number of Removals", however, I think the average time is assumed as well.
Let's consider the following situation:
- cache.put(key, value); // removals = 0, averageTime = 0
- cache.remove(key); // removals = 1, averageTime = 100ms
- cache.remove(notExistingKey1); // removals = 1, averageTime = 200ms (in your pull-request, this metric is always updated)
- cache.remove(notExistingKey1); // removals = 1, averageTime = 300ms (---//---)
In my understanding, this behavior does not seem correct.
Yes, I see that your pull request passed the TCK (as the previous version of code as well), however, it speaks about the quality of the TCK itself :)
> The remove metric value is different for sync and async methods
> ---------------------------------------------------------------
>
> Key: IGNITE-15666
> URL: https://issues.apache.org/jira/browse/IGNITE-15666
> Project: Ignite
> Issue Type: Bug
> Reporter: Amelchev Nikita
> Assignee: Amelchev Nikita
> Priority: Major
> Fix For: 2.12
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The remove metric value is different for sync and async methods.
> The following metrics are updated only if the key was exist for the sync version:
> {noformat}
> RemoveTimeTotal
> RemoveTime
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)