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

Aleksandr Chesnokov edited comment on IGNITE-23355 at 10/15/24 9:57 AM:
------------------------------------------------------------------------

Maksim Timonin suggested fixing *_getClusterMovingPartitionsCount_* metric, not 
test.

As I said, the metric getClusterMovingPartitionsCount is computed too early, 
which causes it to fail with NPE. I tried several solutions:
 * Using a Semaphore: I attempted to solve the problem with a semaphore by 
creating a method *_onInitialized_* in the *_GridDhtPartitionTopology_* 
interface. At the initialization stage of the metrics (in 
{*}_CacheGroupMetricsImpl.onTopologyInitialized_{*}), I would wait until the 
topology is initialized. However, I encountered an issue where the topology is 
initialized in the same thread but apparently after the metrics initialization, 
which resulted in a deadlock

 * Using {*}_GridDhtPartitionTopology.topologyVersionFuture_{*}: I implemented 
the solution so that when counting the metric, we first wait for the completion 
of this future, and only then do the counting. This solution fixed 
{*}_testClientNodePds_{*}. However, now several tests in the Open Census 
section (for example, 
{*}_OpenCensusMetricExporterSpiTest.testFilterAndExport_{*}) are failing 
because of an assertion on topReadyFuture, which is in the method 
{_}*GridDhtTopologyFuture.topologyVersionFuture*{_}. It turns out we are now 
calling the future too early.

 * Returning zero if topology is not ready: After all these manipulations, I 
looked at metric {*}_clusterPartitionsMapByState_{*}, which simply returns an 
empty collection if the topology is not ready. Now I think it's not a bad 
work-around to return zero if topology has not been initialized yet


was (Author: JIRAUSER307233):
Maksim Timonin suggested to fix *_getClusterMovingPartitionsCount_* metric, not 
test.

As I said, the metric getClusterMovingPartitionsCount is computed too early, 
which causes it to fail with NPE. I tried several solutions:
 * Using a Semaphore: I attempted to solve the problem with a semaphore by 
creating a method *_onInitialized_* in the *_GridDhtPartitionTopology_* 
interface. At the initialization stage of the metrics (in 
{*}_CacheGroupMetricsImpl.onTopologyInitialized_{*}), I would wait until the 
topology is initialized. However, I encountered an issue where the topology is 
initialized in the same thread but apparently after the metrics initialization, 
which resulted in a deadlock

 * Using {*}_GridDhtPartitionTopology.topologyVersionFuture_{*}: I implemented 
the solution so that when counting the metric, we first wait for the completion 
of this future, and only then do the counting. This solution fixed 
{*}_testClientNodePds_{*}. However, now several tests in the Open Census 
section (for example, 
{*}_OpenCensusMetricExporterSpiTest.testFilterAndExport_{*}) are failing 
because of an assertion on topReadyFuture, which is in the method 
{_}*GridDhtTopologyFuture.topologyVersionFuture*{_}. It turns out we are now 
calling the future too early.

 * Returning zero if topology is not ready: After all these manipulations, I 
looked at metric {*}_clusterPartitionsMapByState_{*}, which simply returns an 
empty collection if the topology is not ready. Now I think it's not a bad 
work-around to return zero if topology has not been initialized yet

> testClientNodePds sometimes fails with NullPointerException
> -----------------------------------------------------------
>
>                 Key: IGNITE-23355
>                 URL: https://issues.apache.org/jira/browse/IGNITE-23355
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>            Reporter: Aleksandr Chesnokov
>            Assignee: Aleksandr Chesnokov
>            Priority: Minor
>              Labels: test-failures
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> flaky testClientNodePds sometimes fails with NullPointerException
> {code:java}
> ======= Failed test run #1 ==========
>   Error was logged: java.lang.NullPointerException  at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.clusterPartitionsCountByState(CacheGroupMetricsImpl.java:319)
>   at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.getClusterMovingPartitionsCount(CacheGroupMetricsImpl.java:375)
>   at 
> org.apache.ignite.internal.util.lang.GridFunc.lambda$nonThrowableSupplier$2(GridFunc.java:3300)
>   at 
> org.apache.ignite.internal.processors.metric.impl.IntGauge.value(IntGauge.java:45)
>   at org.apache.ignite.spi.metric.IntMetric.getAsString(IntMetric.java:29)  
> at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.checkClientNode(CacheGroupMetricsTest.java:451)
>   at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.testClientNodePds(CacheGroupMetricsTest.java:410)
>   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)  at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.base/java.lang.reflect.Method.invoke(Method.java:566)  at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2499)
>   at java.base/java.lang.Thread.run(Thread.java:829)
>   Error was logged: java.lang.NullPointerException
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.clusterPartitionsCountByState(CacheGroupMetricsImpl.java:319)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.getClusterMovingPartitionsCount(CacheGroupMetricsImpl.java:375)
>     at 
> org.apache.ignite.internal.util.lang.GridFunc.lambda$nonThrowableSupplier$2(GridFunc.java:3300)
>     at 
> org.apache.ignite.internal.processors.metric.impl.IntGauge.value(IntGauge.java:45)
>     at org.apache.ignite.spi.metric.IntMetric.getAsString(IntMetric.java:29)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.checkClientNode(CacheGroupMetricsTest.java:451)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.testClientNodePds(CacheGroupMetricsTest.java:410)
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>     at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>     at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>     at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>     at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>     at 
> org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2499)
>     at java.base/java.lang.Thread.run(Thread.java:829)
>   ------- Stdout: -------
>   class org.apache.ignite.IgniteException: Error was logged: 
> java.lang.NullPointerException
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.clusterPartitionsCountByState(CacheGroupMetricsImpl.java:319)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.getClusterMovingPartitionsCount(CacheGroupMetricsImpl.java:375)
>     at 
> org.apache.ignite.internal.util.lang.GridFunc.lambda$nonThrowableSupplier$2(GridFunc.java:3300)
>     at 
> org.apache.ignite.internal.processors.metric.impl.IntGauge.value(IntGauge.java:45)
>     at org.apache.ignite.spi.metric.IntMetric.getAsString(IntMetric.java:29)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.checkClientNode(CacheGroupMetricsTest.java:451)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.testClientNodePds(CacheGroupMetricsTest.java:410)
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>     at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>     at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>     at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>     at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>     at 
> org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2499)
>     at java.base/java.lang.Thread.run(Thread.java:829)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest$3.accept(CacheGroupMetricsTest.java:439)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest$3.accept(CacheGroupMetricsTest.java:436)
>     at 
> org.apache.ignite.testframework.ListeningTestLogger.applyListeners(ListeningTestLogger.java:222)
>     at 
> org.apache.ignite.testframework.ListeningTestLogger.warning(ListeningTestLogger.java:170)
>     at 
> org.apache.ignite.internal.GridLoggerProxy.warning(GridLoggerProxy.java:152)
>     at org.apache.ignite.internal.util.IgniteUtils.warn(IgniteUtils.java:4724)
>     at 
> org.apache.ignite.internal.util.GridLogThrottle$LogLevel$2.doLog(GridLogThrottle.java:284)
>     at 
> org.apache.ignite.internal.util.GridLogThrottle.log(GridLogThrottle.java:227)
>     at 
> org.apache.ignite.internal.util.GridLogThrottle.warn(GridLogThrottle.java:136)
>     at 
> org.apache.ignite.internal.util.lang.GridFunc.lambda$nonThrowableSupplier$2(GridFunc.java:3303)
>     at 
> org.apache.ignite.internal.processors.metric.impl.IntGauge.value(IntGauge.java:45)
>     at org.apache.ignite.spi.metric.IntMetric.getAsString(IntMetric.java:29)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.checkClientNode(CacheGroupMetricsTest.java:451)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.testClientNodePds(CacheGroupMetricsTest.java:410)
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>     at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>     at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>     at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>     at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>     at 
> org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2499)
>     at java.base/java.lang.Thread.run(Thread.java:829)
> ======= Failed test run #2 ==========
>   class org.apache.ignite.IgniteException: Error was logged: 
> java.lang.NullPointerException
>    at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.clusterPartitionsCountByState(CacheGroupMetricsImpl.java:319)
>    at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.getClusterMovingPartitionsCount(CacheGroupMetricsImpl.java:375)
>    at 
> org.apache.ignite.internal.util.lang.GridFunc.lambda$nonThrowableSupplier$2(GridFunc.java:3300)
>    at 
> org.apache.ignite.internal.processors.metric.impl.IntGauge.value(IntGauge.java:45)
>    at org.apache.ignite.spi.metric.IntMetric.getAsString(IntMetric.java:29)
>    at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.checkClientNode(CacheGroupMetricsTest.java:451)
>    at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.testClientNodePds(CacheGroupMetricsTest.java:410)
>    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>    at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>    at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>    at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>    at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>    at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>    at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>    at 
> org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2499)
>    at java.base/java.lang.Thread.run(Thread.java:829)
>   class org.apache.ignite.IgniteException: Error was logged: 
> java.lang.NullPointerException
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.clusterPartitionsCountByState(CacheGroupMetricsImpl.java:319)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.getClusterMovingPartitionsCount(CacheGroupMetricsImpl.java:375)
>     at 
> org.apache.ignite.internal.util.lang.GridFunc.lambda$nonThrowableSupplier$2(GridFunc.java:3300)
>     at 
> org.apache.ignite.internal.processors.metric.impl.IntGauge.value(IntGauge.java:45)
>     at org.apache.ignite.spi.metric.IntMetric.getAsString(IntMetric.java:29)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.checkClientNode(CacheGroupMetricsTest.java:451)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.testClientNodePds(CacheGroupMetricsTest.java:410)
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>     at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>     at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>     at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>     at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>     at 
> org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2499)
>     at java.base/java.lang.Thread.run(Thread.java:829)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest$3.accept(CacheGroupMetricsTest.java:439)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest$3.accept(CacheGroupMetricsTest.java:436)
>     at 
> org.apache.ignite.testframework.ListeningTestLogger.applyListeners(ListeningTestLogger.java:222)
>     at 
> org.apache.ignite.testframework.ListeningTestLogger.warning(ListeningTestLogger.java:170)
>     at 
> org.apache.ignite.internal.GridLoggerProxy.warning(GridLoggerProxy.java:152)
>     at org.apache.ignite.internal.util.IgniteUtils.warn(IgniteUtils.java:4724)
>     at 
> org.apache.ignite.internal.util.GridLogThrottle$LogLevel$2.doLog(GridLogThrottle.java:284)
>     at 
> org.apache.ignite.internal.util.GridLogThrottle.log(GridLogThrottle.java:227)
>     at 
> org.apache.ignite.internal.util.GridLogThrottle.warn(GridLogThrottle.java:136)
>     at 
> org.apache.ignite.internal.util.lang.GridFunc.lambda$nonThrowableSupplier$2(GridFunc.java:3303)
>     at 
> org.apache.ignite.internal.processors.metric.impl.IntGauge.value(IntGauge.java:45)
>     at org.apache.ignite.spi.metric.IntMetric.getAsString(IntMetric.java:29)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.checkClientNode(CacheGroupMetricsTest.java:451)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.testClientNodePds(CacheGroupMetricsTest.java:410)
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>     at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>     at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>     at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>     at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>     at 
> org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2499)
>     at java.base/java.lang.Thread.run(Thread.java:829)
>   ------- Stdout: -------
>   [14:50:10] >>> Starting test: CacheGroupMetricsTest#testClientNodePds <<<
>   [14:50:10] >>> Heap: 409 MB used / 2048 MB commited / 2048 MB max <<<
>   [14:50:10] >>> Non-Heap: 184 MB used / 195 MB commited / 0 MB max <<<
>   [14:50:11] >>> Stopping test: CacheGroupMetricsTest#testClientNodePds in 
> 623 ms <<<
>   [14:50:11] >>> Heap: 480 MB used / 2048 MB commited / 2048 MB max <<<
>   [14:50:11] >>> Non-Heap: 184 MB used / 195 MB commited / 0 MB max <<<
>   ------- Stderr: -------
>   [2024-10-03T14:50:10,657][WARN 
> ][test-runner-#24218%cache.CacheGroupMetricsTest%][G] Ignite work directory 
> is not provided, automatically resolved to: 
> /data/tcAgent/work/7bc1c54bc719b67c/work
>   [2024-10-03T14:50:10,657][WARN 
> ][test-runner-#24218%cache.CacheGroupMetricsTest%][G] Consistent ID is not 
> set, it is recommended to set consistent ID for production clusters (use 
> IgniteConfiguration.setConsistentId property)
>   [2024-10-03T14:50:10,659][WARN 
> ][test-runner-#24218%cache.CacheGroupMetricsTest%][CacheGroupMetricsTest0] 
> Peer class loading is enabled (disable it in production for performance and 
> deployment consistency reasons)
>   [2024-10-03T14:50:10,677][WARN 
> ][test-runner-#24218%cache.CacheGroupMetricsTest%][TcpCommunicationSpi] 
> Message queue limit is set to 0 which may lead to potential OOMEs when 
> running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to message 
> queues growth on sender and receiver sides.
>   [2024-10-03T14:50:10,871][WARN 
> ][test-runner-#24218%cache.CacheGroupMetricsTest%][GridLocalConfigManager] 
> Static configuration for the following caches will be ignored because a 
> persistent cache with the same name already exist (see 
> https://apacheignite.readme.io/docs/cache-configuration for more 
> information): [cache3, cache2, cache4, cache1]
>   [2024-10-03T14:50:11,156][WARN 
> ][test-runner-#24218%cache.CacheGroupMetricsTest%][G] Ignite work directory 
> is not provided, automatically resolved to: 
> /data/tcAgent/work/7bc1c54bc719b67c/work
>   [2024-10-03T14:50:11,156][WARN 
> ][test-runner-#24218%cache.CacheGroupMetricsTest%][G] Consistent ID is not 
> set, it is recommended to set consistent ID for production clusters (use 
> IgniteConfiguration.setConsistentId property)
>   [2024-10-03T14:50:11,158][WARN 
> ][test-runner-#24218%cache.CacheGroupMetricsTest%][CacheGroupMetricsTest1] 
> Peer class loading is enabled (disable it in production for performance and 
> deployment consistency reasons)
>   [2024-10-03T14:50:11,178][WARN 
> ][test-runner-#24218%cache.CacheGroupMetricsTest%][TcpCommunicationSpi] 
> Message queue limit is set to 0 which may lead to potential OOMEs when 
> running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to message 
> queues growth on sender and receiver sides.
>   [2024-10-03T14:50:11,182][WARN 
> ][test-runner-#24218%cache.CacheGroupMetricsTest%][GridCacheProcessor] 
> Persistent Store is not supported on client nodes (Persistent Store's 
> configuration will be ignored).
>   [2024-10-03T14:50:11,260][WARN 
> ][test-runner-#24218%cache.CacheGroupMetricsTest%][GridMetricManager] 
> Exception in supplier
>   java.lang.NullPointerException: null
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.clusterPartitionsCountByState(CacheGroupMetricsImpl.java:319)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.getClusterMovingPartitionsCount(CacheGroupMetricsImpl.java:375)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.util.lang.GridFunc.lambda$nonThrowableSupplier$2(GridFunc.java:3300)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.metric.impl.IntGauge.value(IntGauge.java:45)
>  [classes/:?]
>     at org.apache.ignite.spi.metric.IntMetric.getAsString(IntMetric.java:29) 
> [classes/:?]
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.checkClientNode(CacheGroupMetricsTest.java:451)
>  [test-classes/:?]
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.testClientNodePds(CacheGroupMetricsTest.java:410)
>  [test-classes/:?]
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method) ~[?:?]
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  ~[?:?]
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  ~[?:?]
>     at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
>     at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>  [junit-4.12.jar:4.12]
>     at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>  [junit-4.12.jar:4.12]
>     at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>  [junit-4.12.jar:4.12]
>     at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>  [junit-4.12.jar:4.12]
>     at 
> org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2499)
>  [test-classes/:?]
>     at java.base/java.lang.Thread.run(Thread.java:829) [?:?]
>   [2024-10-03T14:50:11,272][ERROR][main][] Test failed 
> [test=CacheGroupMetricsTest#testClientNodePds, duration=618]
>   org.apache.ignite.IgniteException: Error was logged: 
> java.lang.NullPointerException
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.clusterPartitionsCountByState(CacheGroupMetricsImpl.java:319)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsImpl.getClusterMovingPartitionsCount(CacheGroupMetricsImpl.java:375)
>     at 
> org.apache.ignite.internal.util.lang.GridFunc.lambda$nonThrowableSupplier$2(GridFunc.java:3300)
>     at 
> org.apache.ignite.internal.processors.metric.impl.IntGauge.value(IntGauge.java:45)
>     at org.apache.ignite.spi.metric.IntMetric.getAsString(IntMetric.java:29)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.checkClientNode(CacheGroupMetricsTest.java:451)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.testClientNodePds(CacheGroupMetricsTest.java:410)
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>     at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>     at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>     at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>     at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>     at 
> org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2499)
>     at java.base/java.lang.Thread.run(Thread.java:829)
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest$3.accept(CacheGroupMetricsTest.java:439)
>  ~[test-classes/:?]
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest$3.accept(CacheGroupMetricsTest.java:436)
>  ~[test-classes/:?]
>     at 
> org.apache.ignite.testframework.ListeningTestLogger.applyListeners(ListeningTestLogger.java:222)
>  ~[test-classes/:?]
>     at 
> org.apache.ignite.testframework.ListeningTestLogger.warning(ListeningTestLogger.java:170)
>  ~[test-classes/:?]
>     at 
> org.apache.ignite.internal.GridLoggerProxy.warning(GridLoggerProxy.java:152) 
> ~[classes/:?]
>     at 
> org.apache.ignite.internal.util.IgniteUtils.warn(IgniteUtils.java:4724) 
> ~[classes/:?]
>     at 
> org.apache.ignite.internal.util.GridLogThrottle$LogLevel$2.doLog(GridLogThrottle.java:284)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.util.GridLogThrottle.log(GridLogThrottle.java:227) 
> ~[classes/:?]
>     at 
> org.apache.ignite.internal.util.GridLogThrottle.warn(GridLogThrottle.java:136)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.util.lang.GridFunc.lambda$nonThrowableSupplier$2(GridFunc.java:3303)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.metric.impl.IntGauge.value(IntGauge.java:45)
>  ~[classes/:?]
>     at org.apache.ignite.spi.metric.IntMetric.getAsString(IntMetric.java:29) 
> ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.checkClientNode(CacheGroupMetricsTest.java:451)
>  ~[test-classes/:?]
>     at 
> org.apache.ignite.internal.processors.cache.CacheGroupMetricsTest.testClientNodePds(CacheGroupMetricsTest.java:410)
>  ~[test-classes/:?]
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method) ~[?:?]
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  ~[?:?]
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  ~[?:?]
>     at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
>     at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>  ~[junit-4.12.jar:4.12]
>     at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>  ~[junit-4.12.jar:4.12]
>     at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>  ~[junit-4.12.jar:4.12]
>     at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>  ~[junit-4.12.jar:4.12]
>     at 
> org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2499)
>  ~[test-classes/:?]
>     at java.base/java.lang.Thread.run(Thread.java:829) ~[?:?]  {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to