You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2020/10/16 21:10:39 UTC

[GitHub] [phoenix] jpisaac commented on a change in pull request #916: PHOENIX-6171 Child views should not be allowed to override the parent view PHOENIX_TTL attribute.

jpisaac commented on a change in pull request #916:
URL: https://github.com/apache/phoenix/pull/916#discussion_r506722736



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
##########
@@ -2621,6 +2625,13 @@ private MetaDataMutationResult doDropTable(byte[] key, byte[] tenantId, byte[] s
                 List<ImmutableBytesPtr> invalidateList = new ArrayList<ImmutableBytesPtr>();
                 invalidateList.add(cacheKey);
                 PTable table = getTableFromCache(cacheKey, clientTimeStamp, clientVersion);
+
+                // Disallow if the parent has PHOENIX_TTL set.
+                if (parentTable != null &&  parentTable.getPhoenixTTL() != PHOENIX_TTL_NOT_DEFINED) {

Review comment:
       @yanxinyi  Currently the PHOENIX_TTL value is stored with every view and at every level - so in this case V2 would have the same PHOENIX_TTL value as of V1. So when creating V3 the parentTable.getPhoenixTTL() != PHOENIX_TTL_NOT_DEFINED. 
   
   But realized as was going thru this that I need an additional check to ensure that the PHOENIX_TTL is being altered




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org