[
https://issues.apache.org/jira/browse/GEODE-9973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17481657#comment-17481657
]
Alberto Gomez edited comment on GEODE-9973 at 1/25/22, 9:12 AM:
----------------------------------------------------------------
[~donalevans] The org.apache.geode.internal.tcp.ConnectionTable class schedules
an idle-connection timeout task for each connection, it manages if the
idle-timeout for the connection is not zero. This task (IdleConnTT)
periodically calls the checkForIdleTimeout() method of the connection calling
in turn closeForReconnect() (which closes the connection) when it detects that
the connection has been idle for longer than the idleTimeout.
The idleConnectionTimeout value for a Connection is obtained from the
TCPConduit member of the connection by calling the getIdleTimeout() method.
This idleConnectionTimeout in TCPConduit is initialized to
DEFAULT_SOCKET_LEASE_TIME and can be overridden by the
p2p.idleConnectionTimeout property if set. And the value for this property is
set with the value of socket-lease-time coming from the configuration
(DistributionConfig) in the constructor of DirectChannel when it creates a new
TCPConduit .
was (Author: alberto.gomez):
[~donalevans] I
The org.apache.geode.internal.tcp.ConnectionTable class schedules an
idle-connection timeout task for each connection it manages if the idle-timeout
for the connection is not zero. This task (IdleConnTT) periodically calls the
checkForIdleTimeout() method of the connection calling in turn
closeForReconnect() (which closes the connection) when it detects that the
connection has been idle for longer than the idleTimeout.
The idleConnectionTimeout value for a Connection is obtained from the
TCPConduit member of the connection by calling the getIdleTimeout() method.
This idleConnectionTimeout in TCPConduit is initialized to
DEFAULT_SOCKET_LEASE_TIME and can be overridden by the
p2p.idleConnectionTimeout property. And the value for this property is set with
the value of socket-lease-time coming from the configuration
(DistributionConfig) in the constructor of DirectChannel when it creates a new
TCPConduit .
> Documentation: socket-lease-time is not used to return sockets to a pool but
> to close them
> ------------------------------------------------------------------------------------------
>
> Key: GEODE-9973
> URL: https://issues.apache.org/jira/browse/GEODE-9973
> Project: Geode
> Issue Type: Bug
> Components: docs
> Reporter: Alberto Gomez
> Assignee: Donal Evans
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.15.0
>
>
> The "Making sure you have enough sockets" Geode documentation section says
> the following about socket-lease-time (check underlined sentence):
>
> Peer-to-peer. For peer-to-peer threads that do not share sockets, you can use
> the socket-lease-time to make sure that no socket sits idle for too long.
> +When a socket that belongs to an individual thread remains unused for this
> time period, the system automatically returns it to the pool.+ The next time
> the thread needs a socket, it creates a new socket.
>
> Actually, the system automatically closes the connection in the situation
> described instead of returning it to any pool.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)