Github user vincentpoon commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/290#discussion_r164577121
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java ---
    @@ -312,6 +317,16 @@ private static QueryPlan addPlan(PhoenixStatement 
statement, SelectStatement sel
             return null;
         }
     
    +    // returns true if we can still use the index
    +    // retuns false if we've been in PENDING_DISABLE too long - index 
should be considered disabled
    +    private static boolean isUnderPendingDisableThreshold(PhoenixStatement 
statement, PTable indexTable) {
    +        return EnvironmentEdgeManager
    +                .currentTimeMillis() - 
indexTable.getIndexDisableTimestamp() <= statement
    --- End diff --
    
    @JamesRTaylor So found out the problem is that for index tables that are 
disabled, in MetaDataEndpointImpl we use the the indexDisableTimestamp for the 
mutationTime.  There's this comment:
    "            // Freeze time for table at min non-zero value of 
INDEX_DISABLE_TIMESTAMP
                // This will keep the table consistent with index as the table 
has had one more
                // batch applied to it."
    Is that still required?   I think I have to find another way to get the 
server time because of this.


---

Reply via email to