You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/01/01 02:51:39 UTC

[jira] [Commented] (ACCUMULO-3509) Scanner lock cause Tablet lock, hence preventing idle scans from being swept, hence blocking SimpleTimer thread

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

ASF GitHub Bot commented on ACCUMULO-3509:
------------------------------------------

GitHub user phrocker opened a pull request:

    https://github.com/apache/accumulo/pull/60

    ACCUMULO-3509: Allow cleanup state to be kept to avoid blocking tserv…

    …er session sweep
    
    By enabling state ( true/false) from 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.
    
    Added unit test that in the error condition will show the missing scan sessions ( which are missing due to the cleanup being blocked)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/phrocker/accumulo-1 master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/accumulo/pull/60.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 #60
    
----
commit bbd2257a001d654a87b433bb387ad9fce402dbb8
Author: phrocker <ma...@gmail.com>
Date:   2015-12-31T15:16:49Z

    ACCUMULO-3509: Allow cleanup state to be kept to avoid blocking tserver session sweep
    
    By enabling state ( true/false) from 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.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)