ReentrantLock.getOwner() to help clean up scan sessions#3644
ReentrantLock.getOwner() to help clean up scan sessions#3644DomGarguilo merged 2 commits intoapache:2.1from
Conversation
dlmarion
left a comment
There was a problem hiding this comment.
LGTM, I kicked off full IT build for this PR.
|
@keith-turner - would running your new scan consistency test for an extended period also stress these lock changes? |
|
Full IT build passed successfully |
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Scanner.java
Show resolved
Hide resolved
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Scanner.java
Show resolved
Hide resolved
The test will definitely stress the read method modified in this PR. However I do not think it will stress the close method. I think to stress this the test would need to do the following
I don't think the test does this, but it should if it does not. Some of its scans should randomly be open ended and not read all the data. On a long running test this would trigger the session clean up that calls close on an idle session. |
Co-authored-by: Keith Turner <kturner@apache.org>
|
@EdColeman I created #3656 to add an open ended scan to the test. However I am not sure if will leave a scan session open on the tserver. A scan may have to not read all data from a scanner and not close the scanner to leave a scan session open. I am not sure though. Wonder if the test should randomly not close scanners also. |
Closes #3579
This PR replaces the semaphore with a
ReentrantLockinScanner. A new private class,InterruptibleLockwas created to expose the protectedgetOwner()method.I am not too sure how to test these changes so have not added any tests yet. Ideas/suggestions are welcome.