You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@rya.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/12/19 18:09:06 UTC

[jira] [Commented] (RYA-413) MongoDB Rya DAO not closing MongoClient properly

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

ASF GitHub Bot commented on RYA-413:
------------------------------------

GitHub user ejwhite922 opened a pull request:

    https://github.com/apache/incubator-rya/pull/253

    RYA-413 Fixed how MongoDBRyaDAO closed its internal mongoClient.  Updated AbstractMongoDBRdfConfigurationBuilder config tags.

    ## Description
    If the MongoDBRyaDAO is destroyed, its internal mongoClient is not disposed correctly.  This leaves the mongoClient closed which causes problems the next time the MongoDBRyaDAO is created.
    
    The mongoClient is managed by MongoConnectorFactory and needs to be null'ed out to be recreated properly (by calling MongoConnectorFactory.closeMongoClient(); instead of mongoClient.close();)
    
    Some new unit tests were added to test reconstructing the DAO.  They failed with the old way of using mongoClient.close() and pass with the new way of using MongoConnectorFactory.closeMongoClient().
    
    Also, all the static final config tags inside AbstractMongoDBRdfConfigurationBuilder were changed from protected to public (like AbstractAccumuloRdfConfigurationBuilder has) so they could be used inside other tests that make use of the tags.
    
    ### Tests
    Unit tests
    
    ### Links
    [Jira](https://issues.apache.org/jira/browse/RYA-413)
    
    ### Checklist
    - [ ] Code Review
    - [ ] Squash Commits
    
    #### People To Review
    @meiercaleb 
    @kchilton2 
    @jessehatfield 
    @isper3at 
    @DLotts
    @pujav65 

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

    $ git pull https://github.com/ejwhite922/incubator-rya RYA-413_MongoDBRyaDAOClosing

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

    https://github.com/apache/incubator-rya/pull/253.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 #253
    
----
commit efa0857183a495c9d86f002f9bdd8f7a557c2842
Author: eric.white <er...@parsons.com>
Date:   2017-12-19T17:59:52Z

    RYA-413 Fixed how MongoDBRyaDAO closed its internal mongoClient.  Updated AbstractMongoDBRdfConfigurationBuilder config tags.

----


> MongoDB Rya DAO not closing MongoClient properly
> ------------------------------------------------
>
>                 Key: RYA-413
>                 URL: https://issues.apache.org/jira/browse/RYA-413
>             Project: Rya
>          Issue Type: Bug
>          Components: dao
>    Affects Versions: 3.2.12
>            Reporter: Eric White
>            Assignee: Eric White
>            Priority: Minor
>             Fix For: 3.2.12
>
>
> If the MongoDBRyaDAO is destroyed, its internal mongoClient is not disposed correctly.  This leaves the mongoClient closed which causes problems the next time the MongoDBRyaDAO is created.
> The mongoClient is managed by MongoConnectorFactory and needs to be null'ed out to be recreated properly (by calling MongoConnectorFactory.closeMongoClient(); instead of mongoClient.close();)
> Also, all the static final config tags inside AbstractMongoDBRdfConfigurationBuilder should be changed from protected to public (like AbstractAccumuloRdfConfigurationBuilder has) so they could be used inside other tests that make use of the tags.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)