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 2015/07/14 18:31:05 UTC
[jira] [Commented] (PHOENIX-2111) Race condition on creation of new
view and adding of column to base table
[ https://issues.apache.org/jira/browse/PHOENIX-2111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14626601#comment-14626601 ]
James Taylor commented on PHOENIX-2111:
---------------------------------------
Patch looks good. One minor nit - can you change getLinkType() to return LinkType instead of the serialized value (and null if not found)?
{code}
+ public static byte getLinkType(Mutation tableMutation) {
+ List<Cell> kvs = tableMutation.getFamilyCellMap().get(PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES);
+ if (kvs != null) {
+ for (Cell kv : kvs) {
+ if (Bytes.compareTo(kv.getQualifierArray(), kv.getQualifierOffset(), kv.getQualifierLength(), PhoenixDatabaseMetaData.LINK_TYPE_BYTES, 0, PhoenixDatabaseMetaData.LINK_TYPE_BYTES.length) == 0) {
+ return PUnsignedTinyint.INSTANCE.getCodec().decodeByte(kv.getValueArray(), kv.getValueOffset(), SortOrder.getDefault());
+ }
+ }
+ }
+ return (byte)-1;
+ }
{code}
> Race condition on creation of new view and adding of column to base table
> -------------------------------------------------------------------------
>
> Key: PHOENIX-2111
> URL: https://issues.apache.org/jira/browse/PHOENIX-2111
> Project: Phoenix
> Issue Type: Bug
> Reporter: James Taylor
> Assignee: Samarth Jain
> Attachments: PHOENIX-2011-wip.patch
>
>
> There's currently a potential race condition between creating a view and adding a column to the base table. The logic to find the parent row key is incorrect for this scenario.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)