[
https://issues.apache.org/jira/browse/NIFI-4461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Payne updated NIFI-4461:
-----------------------------
Status: Patch Available (was: Open)
> DistributedMapCacheClient/Server are inefficient when waiting for data to be
> received from socket
> -------------------------------------------------------------------------------------------------
>
> Key: NIFI-4461
> URL: https://issues.apache.org/jira/browse/NIFI-4461
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Mark Payne
> Assignee: Mark Payne
> Fix For: 1.5.0
>
>
> The DistributedMapCacheClient and DistributedMapCacheServer use the
> SocketChannelInputStream and SSLSocketChannelInputStream (and output streams)
> for communicating over a socket in non-blocking mode. This is done to allow a
> timeout to occur on a socket write. However, when reading from the socket, it
> ends up calling Thread.sleep(10, TimeUnit.MILLISECONDS) when there is no data
> available, and that can result in extremely slow performance. Instead, we
> should using blocking mode when receiving data because it will throw a
> timeout exception as we desire. When writing, we should continue using
> non-blocking mode but sleep for far less than 10 milliseconds.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)