You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@accumulo.apache.org by keith-turner <gi...@git.apache.org> on 2016/05/27 21:05:42 UTC
[GitHub] accumulo pull request: ACCUMULO-4318 Made writers and scanners aut...
GitHub user keith-turner opened a pull request:
https://github.com/apache/accumulo/pull/104
ACCUMULO-4318 Made writers and scanners auto closeable
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/keith-turner/accumulo ACCUMULO-4318
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/accumulo/pull/104.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 #104
----
commit cee2cd8d4b554ad18554f9caac3c18c5d0791552
Author: Keith Turner <kt...@apache.org>
Date: 2016-05-27T21:02:49Z
ACCUMULO-4318 Made writers and scanners auto closeable
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] accumulo pull request: ACCUMULO-4318 Made writers and scanners aut...
Posted by dhutchis <gi...@git.apache.org>.
Github user dhutchis commented on the pull request:
https://github.com/apache/accumulo/pull/104#issuecomment-222256568
One thought--- a client might open a BatchScanner in a try-with-resources block but save a reference to `scanner.iterator()` and use that outside the block. If so the client will fail because the BatchScanner will close the query thread pool that the TabletServerBatchReader uses. It would be good to advise users in the documents not to do this.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] accumulo pull request #104: ACCUMULO-4318 Made writers and scanners auto clo...
Posted by keith-turner <gi...@git.apache.org>.
Github user keith-turner closed the pull request at:
https://github.com/apache/accumulo/pull/104
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] accumulo pull request: ACCUMULO-4318 Made writers and scanners auto closeabl...
Posted by keith-turner <gi...@git.apache.org>.
Github user keith-turner commented on the pull request:
https://github.com/apache/accumulo/pull/104
> Noticed that you also added some closing of Scanners that were left to auto-close on GC
No exactly sure what you mean. Can you point it out with a comment?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] accumulo pull request: ACCUMULO-4318 Made writers and scanners aut...
Posted by joshelser <gi...@git.apache.org>.
Github user joshelser commented on the pull request:
https://github.com/apache/accumulo/pull/104#issuecomment-222274573
Noticed that you also added some closing of Scanners that were left to auto-close on GC
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] accumulo pull request: ACCUMULO-4318 Made writers and scanners aut...
Posted by joshelser <gi...@git.apache.org>.
Github user joshelser commented on the pull request:
https://github.com/apache/accumulo/pull/104#issuecomment-222257863
That's a very good point, @dhutchis. I think I've seen really weird things in the same manner where a BatchScanner falls out of scope, the finalizer closes it, and then invalidates the iterator being iterated over (in a for-each loop). I think @wjsl also hit this before.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] accumulo pull request: ACCUMULO-4318 Made writers and scanners auto closeabl...
Posted by joshelser <gi...@git.apache.org>.
Github user joshelser commented on the pull request:
https://github.com/apache/accumulo/pull/104
> No exactly sure what you mean. Can you point it out with a comment?
Maybe close by GC is wrong (I forget if we actually have a finalizer on it now). But, anyways, you added some close calls on Scanners :)
https://github.com/apache/accumulo/pull/104/files#diff-34221dcf488e3b53687222557d82b2f1R300
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] accumulo issue #104: ACCUMULO-4318 Made writers and scanners auto closeable
Posted by keith-turner <gi...@git.apache.org>.
Github user keith-turner commented on the issue:
https://github.com/apache/accumulo/pull/104
Merged this to 1.8. Thanks @joshelser and @dhutchis for taking a look.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] accumulo pull request: ACCUMULO-4318 Made writers and scanners aut...
Posted by keith-turner <gi...@git.apache.org>.
Github user keith-turner commented on the pull request:
https://github.com/apache/accumulo/pull/104#issuecomment-222267272
> It would be good to advise users in the documents not to do this.
I can add some javadoc on the close methods.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] accumulo pull request: ACCUMULO-4318 Made writers and scanners auto closeabl...
Posted by keith-turner <gi...@git.apache.org>.
Github user keith-turner commented on the pull request:
https://github.com/apache/accumulo/pull/104
> Maybe close by GC is wrong (I forget if we actually have a finalizer on it now). But, anyways, you added some close calls on Scanners :)
ok. Introducing Autocloseable introduced lots of warnings in the code. I was just trying to suppress the warnings. When I did this I was thinking Scanners don't have to be closed, so don't need to use try-with-resources. However this could change in the future and the warnings will not be there. I'll change those to use try-with-resources.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---