[ 
https://issues.apache.org/jira/browse/PHOENIX-2111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Samarth Jain updated PHOENIX-2111:
----------------------------------
    Attachment: PHOENIX-2111.patch

Below is the overview of changes in this patch:

1) Introduced a client version attribute in Metadataservice.proto. We can use 
this attribute to check on the server side what client is the request coming 
from. I have used the absence of this attribute as an indication that the 
request is coming from a client older than 4.5. 

2) In previous releases, our way of loading the parent table for a view was 
broken. Also, the mechanism of looking up the parent table's sequence number 
wasn't correct.

3) To ensure backwards compatibility, I am using a GET on the server side to 
figure out the parent table's sequence number. This takes care of the older 
clients not passing the parent table's sequence number.

Below is the testing I have done:
1) Verified that both 4.3 and 4.4 clients can talk to the 4.5 server. Verified 
that older clients can connect to 4.5 server, create table, view, index and 
index on view.
2) Verified that the upgrade that happens when the 4.5 client connects is 
working correctly. 
3) Verified that a mix of clients 4.3, 4.4, 4.5 can talk to the 4.5 server 
(both before and after upgrade)
4) Verified that even after the upgrade, if older clients try to alter a base 
table that has views, we still disallow it. This takes care of the side-effect 
that was introduced in PHOENIX-2099. However, the new 4.5 clients can do the 
same.



> 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-2111.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)

Reply via email to