Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/795#discussion_r108051710
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractSchema.java ---
    @@ -198,6 +200,10 @@ public Expression getExpression(SchemaPlus 
parentSchema, String name) {
     
       @Override
       public boolean contentsHaveChangedSince(long lastCheck, long now) {
    +    //use cached schema for 1 second, it will be helpful if it is highly 
concurrent scenario
    +    if( abs(now - lastCheck) < 1000 ) {
    +      return false;
    --- End diff --
    
    Clearer would be:
    
    ```
    return (now - lastCheck) < 1000;
    ```
    
    And, the 1000 should be made into a constant:
    
    ```
    public static int CACHED_SCHEMA_REFRESH_MS = 1000;
    ```


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to