Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-14710

Cache API operations throw IgniteClientDisconnectedException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.10
    • None
    • cache
    • None
    • Docs Required, Release Notes Required

    Description

      Is it possible for Cache.put() operation to throw raw IgniteClientDisconnectedException:

      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)
      

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ilyak Ilya Kasnacheev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: