You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2018/01/10 05:40:00 UTC
[jira] [Comment Edited] (PHOENIX-4514) A incorrect key object is
used in SequenceManager#validateSequences
[ https://issues.apache.org/jira/browse/PHOENIX-4514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16319715#comment-16319715 ]
James Taylor edited comment on PHOENIX-4514 at 1/10/18 5:39 AM:
----------------------------------------------------------------
Thanks for the JIRA, [~chia7712]. Would you be up for providing a patch? Also, the fixVersion field is set after the fix is committed to indicate the release in which the fix will appear.
was (Author: jamestaylor):
Thanks for the JIRA, [~chia7712]. Would you be up for providing a patch?
> A incorrect key object is used in SequenceManager#validateSequences
> -------------------------------------------------------------------
>
> Key: PHOENIX-4514
> URL: https://issues.apache.org/jira/browse/PHOENIX-4514
> Project: Phoenix
> Issue Type: Bug
> Reporter: Chia-Ping Tsai
> Assignee: Chia-Ping Tsai
> Priority: Minor
>
> nextSequences.get( i ) -> nextSequences.get( i ).getSequenceKey()
> {code:title=SequenceManager.java}
> for (int i = 0; i < nextSequences.size(); i++) {
> sequencePosition[i] = sequenceMap.get(nextSequences.get(i)).getIndex();
> }
> {code}
> It won't cause bug since the impl of SequenceAllocation#hashCode is equal with SequenceKey#hashCode. However, it still a potential bug so a fix is necessary I believe.
> {code:title=SequenceAllocation.java}
> @Override
> public int hashCode() {
> return sequenceKey.hashCode();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)