You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/07/24 18:01:00 UTC
[jira] [Commented] (PHOENIX-4799) Write cells using checkAndMutate
to prevent conflicting changes
[ https://issues.apache.org/jira/browse/PHOENIX-4799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16554596#comment-16554596 ]
ASF GitHub Bot commented on PHOENIX-4799:
-----------------------------------------
GitHub user twdsilva opened a pull request:
https://github.com/apache/phoenix/pull/313
PHOENIX-4799 Write cells using checkAndMutate to prevent conflicting …
…changes
@vincentpoon @karanmehta93 @ChinmaySKulkarni Can you please review?
With this patch, when we add a column we write a cell to SYSTEM.CHILD_LINK with row key (tenantId, schemaName, physicalTableName, columnName) to prevent conflicting concurrent modifications.
While dropping a table or creating a view we also write a cell to SYSTEM.CHILD_LINK with row key (tenantId, schemaName, physicalTableName).
This is done in MetadataClient before we make an rpc to create view / drop table / add column.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/twdsilva/phoenix PHOENIX-4799
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/phoenix/pull/313.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #313
----
commit 421888f914db3307906aa4424e24e202834b3e08
Author: Thomas D'Silva <td...@...>
Date: 2018-07-24T17:49:31Z
PHOENIX-4799 Write cells using checkAndMutate to prevent conflicting changes
----
> Write cells using checkAndMutate to prevent conflicting changes
> ---------------------------------------------------------------
>
> Key: PHOENIX-4799
> URL: https://issues.apache.org/jira/browse/PHOENIX-4799
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Thomas D'Silva
> Assignee: Thomas D'Silva
> Priority: Major
>
> In order to prevent race conditions when multiple client try to mutate the same column before sending the request to mutate the column to the server do a checkAndMutate with the column name being added/dropped. Also:
> 1. When a view is created do a checkAndMutate with the columns in the view where clause.
> 2. When an index on a view is created do a checkAndMutate with the indexed columns.
>
> To prevent a race condition in the DROP TABLE CASCADE case, when a table is dropped do a checkAndMutate with the rowkey of the base table name. If a view is created it also does a checkAndMutate with the same rowkey.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)