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

ASF GitHub Bot commented on DRILL-4882:
---------------------------------------

GitHub user tgrall opened a pull request:

    https://github.com/apache/drill/pull/609

    DRILL-4882 - Support for MongoDB Direct Connection to a node in a Replica 
Set.

    See issue DRILL-4882
    
    In some case, for analytics the applicatio, Drill, has to connect to node 
directly without access the replica set or shard globally.
    
    The new configuration option `direct-connection` true|false allows drillbit 
to be directly connected to a node.
    
    References:
    * [Connection 
String](http://mongodb.github.io/mongo-java-driver/3.0/driver/reference/connecting/connection-settings/)
    * [Direct Connection 
term](https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#terms)


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

    $ git pull https://github.com/tgrall/drill DRILL-4882

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

    https://github.com/apache/drill/pull/609.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 #609
    
----

----


> Drill does not work when it has only access to "secondary nodes"
> ----------------------------------------------------------------
>
>                 Key: DRILL-4882
>                 URL: https://issues.apache.org/jira/browse/DRILL-4882
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - MongoDB
>    Affects Versions: 1.6.0, 1.7.0, 1.8.0
>         Environment: Drill Stand Alone
> Drill in MapR
>            Reporter: Tugdual Grall
>            Priority: Minor
>
> In some deployments, especially when doing analytics on MongoDB, the 
> application, Drill in this case, only have access to secondary nodes. 
> This is a common choice to avoid overloading the Mongo cluster.
> When we have such configuration Drill fail with various exception related to 
> timeout/primary read preference.
> This is due to the fact that some of the "Schema Oriented" methods of 
> MongoDriver are forcing the read preference to primary. The methods are used 
> in the following place in Drill:
> 1-
> https://github.com/apache/drill/blob/1.8.0/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/schema/MongoSchemaFactory.java#L89
> 2-
> https://github.com/apache/drill/blob/1.8.0/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/schema/MongoSchemaFactory.java#L109
> and also the Run command to get information about the type of topology 
> (sharded or not):
> 3- 
> https://github.com/apache/drill/blob/1.8.0/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/MongoGroupScan.java#L167
> 3- could be fixed by simply adding a ReadPreference.primaryPreferred() but 
> not sufficient since we need to have 1 & 2 fixed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to