palashc commented on code in PR #2196:
URL: https://github.com/apache/phoenix/pull/2196#discussion_r2159507615


##########
phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java:
##########
@@ -3333,6 +3333,11 @@ private MetaDataMutationResult doDropTable(byte[] key, 
byte[] tenantId, byte[] s
 
         // Recursively delete indexes
         for (byte[] indexName : indexNames) {
+            if (CDCUtil.isCDCIndex(indexName)) {
+                byte[] cdcKey = SchemaUtil.getTableKey(tenantId, schemaName, 
CDCUtil.getCdcObjectName(indexName));
+                Delete deleteCdc = new Delete(cdcKey, clientTimeStamp);
+                catalogMutations.add(deleteCdc);
+            }

Review Comment:
   > Besides, since your logic is detecting the CDC via the index, if the index 
is dropped first and a failure occurs before CDC object is dropped, then a 
retry will not be able to discover it
   
   Very good point, I missed adding the comment, I will make sure to add it 
with a future PR. 



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

To unsubscribe, e-mail: issues-unsubscr...@phoenix.apache.org

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

Reply via email to