[
https://issues.apache.org/jira/browse/ACCUMULO-3509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15081319#comment-15081319
]
ASF GitHub Bot commented on ACCUMULO-3509:
------------------------------------------
GitHub user phrocker opened a pull request:
https://github.com/apache/accumulo/pull/62
ACCUMULO-3509: Make cleanup stateful to minimize blocking
By enabling state ( true/false) within the cleanup method, the change will
avoid blocking
on a scan session being swept. if the session cleanup blocks because a
ScanSession is
still being read, we may block until the ScanBatch returns for that
ScanSession.
The change uses a simple semaphore ( purely because I like the word ) to
attempt acquisition.
If that fails, we return false from the cleanup and reintroduce that
Session back into
the queue to clean up.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/phrocker/accumulo-1 1.6
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/accumulo/pull/62.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #62
----
commit 7918bd121e772738833a595ea3e83e5c76c6474c
Author: phrocker <[email protected]>
Date: 2016-01-04T15:59:28Z
ACCUMULO-3509: Make cleanup stateful to minimize blocking
By enabling state ( true/false) within the cleanup method, the change will
avoid blocking
on a scan session being swept. if the session cleanup blocks because a
ScanSession is
still being read, we may block until the ScanBatch returns for that
ScanSession.
The change uses a simple semaphore ( purely because I like the word ) to
attempt acquisition.
If that fails, we return false from the cleanup and reintroduce that
Session back into
the queue to clean up.
----
> Scanner lock cause Tablet lock, hence preventing idle scans from being swept,
> hence blocking SimpleTimer thread
> ----------------------------------------------------------------------------------------------------------------
>
> Key: ACCUMULO-3509
> URL: https://issues.apache.org/jira/browse/ACCUMULO-3509
> Project: Accumulo
> Issue Type: Bug
> Components: tserver
> Affects Versions: 1.6.0
> Reporter: marco polo
> Assignee: marco polo
> Fix For: 1.6.5, 1.7.1, 1.8.0
>
>
> Synchronization with Tablet$Scanner via a read() will block close() being
> called via the sweep method in TabletServer. As a result, the SimpleTimer
> thread does not continue, and idle threads grow until the scan completes.
> My patch, which is forthcoming, converts synchronized methods to use a fair
> lock. If the lock is held by a read call, the close call will attempt to
> obtain it, time out, and return indicating a close was not successful. The
> sweep will continue, and the SimpleTimer thread will respawn later,
> attempting closure on those Tablets at a later time.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)