[ISSUE] (TEPHRA-142) Implement a deadlock proof, resource leak proof transaction client provider

2 views
Skip to first unread message

Poorna Chandra (JIRA)

unread,
Oct 22, 2015, 1:13:21 AM10/22/15
to tephr...@googlegroups.com
Poorna Chandra created an issue
 
Tephra / Improvement TEPHRA-142
Implement a deadlock proof, resource leak proof transaction client provider
Issue Type: Improvement Improvement
Assignee: Ali Anwar
Components: core
Created: 21/Oct/15 10:12 PM
Fix Versions: 0.6.3
Priority: Major Major
Reporter: Poorna Chandra

PooledClientProvider has a fixed number of maximum clients it returns. This can lead to deadlock in application.

ThreadLocalClientProvider provides one client per thread, so there will be no deadlock. But there is no reliable way of closing the connection when the thread dies, and this leads to connection leaks.

Having a provider that has no limit on the number of clients returned will be equivalent to ThreadLocalClientProvider, since the number of clients requested can be capped by the number of threads, if each thread requests one client only. In addition, this provider is already resource leak proof as long as threads always return the clients after usage. If this provider can also timeout idle connections after some time, then this will ensure that we do not hold unnecessary connections when not required.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.1.5#6160-sha1:a61a0fc)
Atlassian logo

Ali Anwar (JIRA)

unread,
Oct 30, 2015, 4:36:22 PM10/30/15
to tephr...@googlegroups.com
Ali Anwar resolved an issue as Fixed
 

Merged PR: https://github.com/caskdata/tephra/pull/95
The pull request improves ElasticPool, to be used in place of thread-local client provider.
The ElasticPool has a discrepancy from the description in this JIRA in that the ElasticPool does not time out connections (clients). This should be fine, since we limit the number of connections per elastic pool.

Change By: Ali Anwar
Status: In Progress Resolved
Resolution: Fixed

Poorna Chandra (JIRA)

unread,
Nov 3, 2015, 5:33:22 PM11/3/15
to tephr...@googlegroups.com
PooledClientProvider has a fixed number of maximum clients it returns. This can lead to deadlock in application.

ThreadLocalClientProvider provides one client per thread, so there will be no deadlock. But there is no reliable way of closing the connection when the thread dies, and this leads to connection leaks.

Having a provider that has no limit o...

Poorna Chandra (JIRA)

unread,
Nov 3, 2015, 5:35:27 PM11/3/15
to tephr...@googlegroups.com

Poorna Chandra (JIRA)

unread,
Nov 3, 2015, 7:22:24 PM11/3/15
to tephr...@googlegroups.com

Poorna Chandra (JIRA)

unread,
Nov 4, 2015, 12:29:23 AM11/4/15
to tephr...@googlegroups.com
PooledClientProvider has a fixed number of maximum clients it returns. This can lead to deadlock in application.

ThreadLocalClientProvider provides one client per thread, so there will be no deadlock. But there is no reliable way of closing the connection when the thread dies, and this leads to connection leaks.

Having a provider that has no limit o...
Reply all
Reply to author
Forward
0 new messages