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

Aniket commented on DRILL-6538:
-------------------------------

I saw in the code  in *MongoSchemaFactory.java*

path : 
[drill|https://github.com/apache/drill/tree/1.13.0]/[contrib|https://github.com/apache/drill/tree/1.13.0/contrib]/[storage-mongo|https://github.com/apache/drill/tree/1.13.0/contrib/storage-mongo]/[src|https://github.com/apache/drill/tree/1.13.0/contrib/storage-mongo/src]/[main|https://github.com/apache/drill/tree/1.13.0/contrib/storage-mongo/src/main]/[java|https://github.com/apache/drill/tree/1.13.0/contrib/storage-mongo/src/main/java]/[org|https://github.com/apache/drill/tree/1.13.0/contrib/storage-mongo/src/main/java/org]/[apache|https://github.com/apache/drill/tree/1.13.0/contrib/storage-mongo/src/main/java/org/apache]/[drill|https://github.com/apache/drill/tree/1.13.0/contrib/storage-mongo/src/main/java/org/apache/drill]/[exec|https://github.com/apache/drill/tree/1.13.0/contrib/storage-mongo/src/main/java/org/apache/drill/exec]/[store|https://github.com/apache/drill/tree/1.13.0/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store]/[mongo|https://github.com/apache/drill/tree/1.13.0/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo]/[schema|https://github.com/apache/drill/tree/1.13.0/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/schema]/MongoSchemaFactory.java

 

databases = CacheBuilder //
.newBuilder() //
.expireAfterAccess(1, TimeUnit.MINUTES) //
.build(new DatabaseLoader());
 
tableNameLoader = CacheBuilder //
.newBuilder() //
.expireAfterAccess(1, TimeUnit.MINUTES) //
.build(new TableNameLoader());

 

 

 

I think this is causing the 1-minute delay. 

Is there any way we can overwrite this ?

> MongoDb Collection are accessible only after certain time
> ---------------------------------------------------------
>
>                 Key: DRILL-6538
>                 URL: https://issues.apache.org/jira/browse/DRILL-6538
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>    Affects Versions: 1.12.0, 1.13.0
>            Reporter: Aniket
>            Priority: Major
>
> After creating a new collection in mongo, If immediately drill query on that 
> collection is fired then getting an error. Please note that there is some 
> compound index created in Mongo.
> *org.apache.calcite.runtime.CalciteContextException: From line 1, column 433 
> to line 1, column 437: Object <CollectionName> not found within 
> 'mongo.<DatabaseName>'*
>  After 60 seconds the same query works properly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to