Ilya Kasnacheev created IGNITE-14710:
----------------------------------------
Summary: Cache API operations throw
IgniteClientDisconnectedException
Key: IGNITE-14710
URL: https://issues.apache.org/jira/browse/IGNITE-14710
Project: Ignite
Issue Type: Bug
Components: cache
Affects Versions: 2.10
Reporter: Ilya Kasnacheev
Is it possible for Cache.put() operation to throw raw
IgniteClientDisconnectedException:
{code}
class org.apache.ignite.IgniteClientDisconnectedException: Client node
disconnected: discovery.IgniteDiscoveryThreadInterruptTest1
at
org.apache.ignite.internal.GridKernalGatewayImpl.readLock(GridKernalGatewayImpl.java:93)
at org.apache.ignite.internal.IgniteKernal.guard(IgniteKernal.java:4163)
at
org.apache.ignite.internal.IgniteKernal.transactions(IgniteKernal.java:3173)
at
org.apache.ignite.internal.processors.cache.GridCacheGateway.checkAtomicOpsInTx(GridCacheGateway.java:363)
at
org.apache.ignite.internal.processors.cache.GridCacheGateway.onEnter(GridCacheGateway.java:262)
at
org.apache.ignite.internal.processors.cache.GridCacheGateway.enter(GridCacheGateway.java:177)
at
org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.onEnter(GatewayProtectedCacheProxy.java:1625)
at
org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.put(GatewayProtectedCacheProxy.java:853)
at
org.apache.ignite.spi.discovery.IgniteDiscoveryThreadInterruptTest.run(IgniteDiscoveryThreadInterruptTest.java:117)
at
org.apache.ignite.spi.discovery.IgniteDiscoveryThreadInterruptTest.testStopClientSockWriter(IgniteDiscoveryThreadInterruptTest.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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$7.run(GridAbstractTest.java:2428)
at java.lang.Thread.run(Thread.java:748)
{code}
This is incorrect behavior. Usually cache.put() throws only CacheException and
it should always throw CacheException with IgniteClientDisconnectedException in
getCause().
Currently we are both violating JSR107 and forcing users to handle both
CacheException and IgniteClientDisconnectedException, then check the former to
see if its cause is the latter, and duplicate future recovery code.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)