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

    https://github.com/apache/phoenix/pull/77#discussion_r29098096
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 ---
    @@ -700,6 +1007,29 @@ private PTable loadTable(RegionCoprocessorEnvironment 
env, byte[] key,
             return null;
         }
     
    +    private PFunction loadFunction(RegionCoprocessorEnvironment env, 
byte[] key,
    +            ImmutableBytesPtr cacheKey, long clientTimeStamp, long 
asOfTimeStamp)
    +            throws IOException, SQLException {
    +            HRegion region = env.getRegion();
    +            Cache<ImmutableBytesPtr,PMetaDataEntity> metaDataCache = 
GlobalCache.getInstance(this.env).getMetaDataCache();
    +            PFunction function = 
(PFunction)metaDataCache.getIfPresent(cacheKey);
    +            // We always cache the latest version - fault in if not in 
cache
    +            if (function != null) {
    +                return function;
    +            }
    +            ArrayList<byte[]> arrayList = new ArrayList<byte[]>(1);
    +            arrayList.add(key);
    +            List<PFunction> functions = buildFunctions(arrayList, region, 
asOfTimeStamp);
    +            if(functions != null) return functions.get(0);
    +            // if not found then check if newer table already exists and 
add delete marker for timestamp
    --- End diff --
    
    newer function?


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