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

    https://github.com/apache/phoenix/pull/153#discussion_r57371949
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 ---
    @@ -1115,6 +1212,24 @@ private PFunction 
loadFunction(RegionCoprocessorEnvironment env, byte[] key,
                 return null;
             }
     
    +    private PSchema loadSchema(RegionCoprocessorEnvironment env, byte[] 
key, ImmutableBytesPtr cacheKey,
    +            long clientTimeStamp, long asOfTimeStamp) throws IOException, 
SQLException {
    +        Region region = env.getRegion();
    +        Cache<ImmutableBytesPtr, PMetaDataEntity> metaDataCache = 
GlobalCache.getInstance(this.env).getMetaDataCache();
    +        PSchema schema = (PSchema)metaDataCache.getIfPresent(cacheKey);
    +        // We always cache the latest version - fault in if not in cache
    +        if (schema != null) { return schema; }
    +        ArrayList<byte[]> arrayList = new ArrayList<byte[]>(1);
    +        arrayList.add(key);
    +        List<PSchema> schemas = buildSchemas(arrayList, region, 
asOfTimeStamp, cacheKey);
    +        if (schemas != null) return schemas.get(0);
    +        // if not found then check if newer table already exists and add 
delete marker for timestamp
    --- End diff --
    
    Change comment to mention schema and not table.


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