Igor Kamyshnikov created IGNITE-12335:
-----------------------------------------

             Summary: IgniteDataStreamer flush cannot be really interrupted
                 Key: IGNITE-12335
                 URL: https://issues.apache.org/jira/browse/IGNITE-12335
             Project: Ignite
          Issue Type: Bug
          Components: cache
    Affects Versions: 2.7.6, 2.5
            Reporter: Igor Kamyshnikov
         Attachments: DataStreamerFlushInterruptionTest.java, 
image-2019-10-29-13-05-25-969.png

IgniteDataStreamer flush operation cannot be interrupted:
1) datastreamer.close(true) does not interrupt flushing (though it has 
cancellation mode)
2) flushingThread.interrupt does not interrupt flushing (though 
IgniteInterruptedException is declared in the flush's method throws clause)
3) dataStreamer timeout does not work at all if flushingThread is interrupted
4) dataStreamer timeout does not stop flushing (after catching 
IgniteDataStreamerTimeoutException)
5) Ignition.closeAll(true) can even result in JVM halt if there was 
dataStreamer flush running

Cases on the diagram:
 !image-2019-10-29-13-05-25-969.png|thumbnail! 

Reproducer:
 [^DataStreamerFlushInterruptionTest.java] 

RCA:
For the cases with Thread.interrrupt:
1) Probably,
org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl.Buffer#flush
 method when it enters 
org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl#acquireRemapSemaphore
 does not trigger InterruptedException because it avoid all the operations on 
semaphore.

2) org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl#doFlush 
has a big while(true) loop that does not handle 
IgniteDataStreamerTimeoutException (treating it as just IgniteCheckedException 
leading to "Remaps needed - flush buffers.")

No RCA for dataStreamer.close(true).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to