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 2018/01/05 17:04:00 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=16313449#comment-16313449 ] 

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

Github user ejwhite922 commented on the issue:

    https://github.com/apache/incubator-rya/pull/253
  
    Rebased this review off RYA-303.  Only the latest commit should be review "RYA-413 Fixed how MongoDBRyaDAO..."
    
    The main change is removing mongoClient.close() from MongoDBRyaDAO.destroy().  This may or may not be desirable.  Should the mongoClient be closed from StatefulMongoDBRdfConfiguration when the JVM shuts down?  I only see EmbeddedMongoSingleton closing the mongoClient but it appears that's only used for testing.


> 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)