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

Samarth Jain commented on PHOENIX-3109:
---------------------------------------

Thanks for the review, [~jamestaylor] and [~rajeshbabu]. 

It looks like committing index mutations are failing with my change. I dug into 
it and it looks like the ImmutableBytesPtr.equals() is returning false because 
of this check:

{code}
@Override
    public boolean equals(Object obj) {
        .......
        if (getClass() != obj.getClass()) return false;
        ........
    }
{code}

Is this check intentional? Should it be instead:
{code}
if (! (obj instanceof ImmutableBytesPtr) ) return false;
{code}

In the map I am storing columnReference.getFamilyWritable() which internally is 
a ReadOnlyImmutableBytesPtr. The method signature says that it is returning an 
ImmutableBytesPtr. While reading from the map, I used ImmutableBytesPtr as the 
key and it couldn't find it because equals() returned false.

> Improve and fix the way we are caching column family names for local indexes 
> in IndexMaintainer
> -----------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3109
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3109
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Samarth Jain
>            Assignee: Samarth Jain
>             Fix For: 4.8.0
>
>         Attachments: PHOENIX-3109.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to