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

James Taylor commented on PHOENIX-1812:
---------------------------------------

bq. Do we currently have an option to make all tables transactional by default?
Yes - QueryServices.DEFAULT_TRANSACTIONAL_ATTRIB

In MetaDataClient.updateCache(), we'll need to start a transaction if the table 
is transactional so that we're checking for updates as of the correct timestamp.

The PMetaData cache is immutable and needs to stay that way, so we can't have a 
method like this:
{code}
+                       // update the resolved time of the table 
+                       
tableRef.setResolvedTimeStamp(connection.getResolvedTime(table));
{code}
Instead, make a MetaDataMutated.setResolvedTimeStamp(PTableRef) method. This 
would call PTableCache.clone() and then do a put into the clone with a new 
PTableRef that has the updated resolved time. This call would not cascade to 
the ConnectionQueryServices metadata cache, but instead would just operate on 
the metadata cache for that connection.

> Only sync table metadata when necessary
> ---------------------------------------
>
>                 Key: PHOENIX-1812
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1812
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Thomas D'Silva
>         Attachments: PHOENIX-1812-v2.patch, PHOENIX-1812.patch, 
> PHOENIX-1812.patch, PHOENIX-1812.patch
>
>
> With transactions, we hold the timestamp at the point when the transaction 
> was opened. We can prevent the MetaDataEndpoint getTable RPC in 
> MetaDataClient.updateCache() to check that the client has the latest table if 
> we've already checked at the current transaction ID timestamp. We can keep 
> track of which tables we've already updated in PhoenixConnection.



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

Reply via email to