[ 
https://issues.apache.org/jira/browse/OPENJPA-3072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18141801#comment-18141801
 ] 

ASF subversion and git services commented on OPENJPA-3072:
----------------------------------------------------------

Commit 4294e3d6d1dbb65d319a89d4abe6981a1212933a in openjpa's branch 
refs/heads/OPENJPA-3072 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=4294e3d6d ]

[OPENJPA-3072] Keep the peer check off the send lock and the accept thread, use 
TCP keep-alive

- The listener checks incoming connections against a snapshot of the peer
  addresses instead of taking the lock of the addresses, which is held while
  sending to the peers, possibly for a long time while connecting to a peer
  that is not reachable. Code that changes the addresses calls
  addressesChanged() to update the snapshot.
- DynamicTCPRemoteCommitProvider no longer refreshes its addresses on the
  accept thread. A connection from an unknown host is handed to a receiver
  thread, counted against MaxReceiveConnections, which refreshes the
  addresses before reading anything and closes the connection if the host
  is still unknown. Refreshes run one at a time and at most once per second,
  and one refresh covers all connections accepted before it started.
- KubernetesTCPRemoteCommitProvider defaults RestrictToPeers to false, as it
  only knows ready pods as peers, while pods that are not ready yet can
  already send events.
- Receiving connections use TCP keep-alive, so connections of peers that
  went away without closing them are eventually released and do not hold a
  receiving connection forever.
- Document both in the reference guide.


> TCPRemoteCommitProvider: only accept connections from the configured peers 
> and limit receiving connections
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-3072
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-3072
>             Project: OpenJPA
>          Issue Type: Improvement
>            Reporter: Richard Zowalla
>            Assignee: Richard Zowalla
>            Priority: Major
>             Fix For: 4.2.0
>
>
> The TCP remote commit provider accepts connections from any host and starts 
> one thread per connection without a limit, and finished receiver threads are 
> never removed from the listener. Accept only connections from the configured 
> Addresses (and this host), with an option to turn this off, limit the number 
> of receiving connections, and remove finished threads.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to