[ 
https://issues.apache.org/jira/browse/PHOENIX-4280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16208772#comment-16208772
 ] 

Thomas D'Silva commented on PHOENIX-4280:
-----------------------------------------

I might be missing something, but for the changes in 
PhoenixTransactionalIndexer you no longer generate a mutation for deletes , so 
how would the index rows be deleted? 
Also the isDelete method checks if the KeyValue type is Put, is that correct? 
In PhoenixTransactionalIndexer there is already an isDeleteMutation() that 
checks if the KeyValue type  is not a put or TransactionUtil.isDelete() is true

{code}
private static boolean isDeleteMutation(Mutation m) {
        for (Map.Entry<byte[],List<Cell>> cellMap : 
m.getFamilyCellMap().entrySet()) {
            for (Cell cell : cellMap.getValue()) {
                if (cell.getTypeByte() != KeyValue.Type.Put.getCode() || 
TransactionUtil.isDelete(cell)) {
                    return true;
                }
            }
        }
        return false;
    }
{code}

> Delete doesn't work when immutable indexes are in building state
> ----------------------------------------------------------------
>
>                 Key: PHOENIX-4280
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4280
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: James Taylor
>             Fix For: 4.12.1
>
>         Attachments: PHOENIX-4280.patch, PHOENIX-4280_v2.patch, 
> PHOENIX-4280_wip.patch
>
>
> We don't generate the Delete mutations correctly in this case as we assume 
> we're scanning over the index table.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to