[
https://issues.apache.org/jira/browse/IGNITE-8645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16496802#comment-16496802
]
Alexey Kuznetsov commented on IGNITE-8645:
------------------------------------------
[~guseinov] hi
I think your test is incorrect.
You spawn transactions from *client* node, but check tx metrics on server nodes.
You check metrics as follows,
{code:java}
long actual =
ignite.cache(CACHE_NAME).metrics().getCacheTxCommits();
assertEquals("Check CacheMetrics.getCacheTxCommits()",
EXPECTED_TX_COMMITS_TOTAL, actual);
{code}
When you start transaction from client node, transaction mertics would be
collected on client node only.
Note that _ignite.cache(CACHE_NAME).metrics()_ returns only cluster-wide
metrics from *server* nodes(this change was introduced here :
https://issues.apache.org/jira/browse/IGNITE-4264)
I propose to change your test like this:
{code:java}
long actual =
cache.metrics(grid.cluster().forCacheNodes(cache.getName())).getCacheTxCommits();
assertEquals("Check CacheMetrics.getCacheTxCommits()",
EXPECTED_TX_COMMITS_TOTAL, actual);
{code}
Are you agree ?
> CacheMetrics.getCacheTxCommits() doesn't include transactions started on
> client node
> ------------------------------------------------------------------------------------
>
> Key: IGNITE-8645
> URL: https://issues.apache.org/jira/browse/IGNITE-8645
> Project: Ignite
> Issue Type: Bug
> Components: cache
> Affects Versions: 2.4
> Reporter: Roman Guseinov
> Assignee: Alexey Kuznetsov
> Priority: Major
> Attachments: CacheTxCommitsMetricTest.java
>
>
> The test is attachedĀ [^CacheTxCommitsMetricTest.java]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)