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 2021/05/04 00:45:53 UTC

[GitHub] [phoenix] ankitjain64 commented on a change in pull request #1219: PHOENIX-6437: Parent-Child Delete marker should get replicated via Sy…

ankitjain64 commented on a change in pull request #1219:
URL: https://github.com/apache/phoenix/pull/1219#discussion_r625451166



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/replication/SystemCatalogWALEntryFilter.java
##########
@@ -103,18 +104,20 @@ private boolean isTenantRowCellSystemChildLink(final Cell cell) {
     if (!isTenantRowCell) {
       boolean isChildLink = CellUtil.matchingQualifier(
         cell, PhoenixDatabaseMetaData.LINK_TYPE_BYTES);
-      if (isChildLink) {
-        if (CellUtil.matchingValue(cell, CHILD_TABLE_BYTES)) {
+      // Check if cell is of type LINK_TYPE with value 4 or DeleteFamily
+      if ((isChildLink && CellUtil.matchingValue(cell, CHILD_TABLE_BYTES)) ||
+          CellUtil.isDeleteFamily(cell) ) {

Review comment:
       To replicate a delete marker we are using two checks.
   1. The cell is of type `DeleteFamily`.
   2. The length for `COLUMN_NAME` is greater than `0`. (For tenant views column_name is populated with tenant_id which is not the case for global views.)
   
   One may argue that the above two checks are also true for delete markers of column rows and we may over-replicate that as well. But, we are avoiding all those scenarios by doing the above filtering only for the mutations belonging to `SYSTEM.CHILD_LINK` table. With 4.15+ we are assured that `SYSTEM.CHILD_LINK` table only stores parent-child linking rows with `LINK_TYPE=4`. Let me know if you still feel we are missing any scenario. Thanks




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