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

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

Thanks, [~tdsilva]. It looks good, but one change that would make this more 
consistent would be to *always* store the resolved time stamp on PTableRef, 
even in the non transactional case. This would involve:
- Changing the MetaDataMutated.addTable() method to take a timestamp argument. 
You'd either use the read pointer if the table is transactional or the 
metaDataMutationResult.getMutationTime() if not. You'd likely need to pass the 
resolved timestamp argument through MetaDataMutated.addColumn() and 
MetaDataMutated.removeColumn() too, as these end up doing a put into the 
underlying map.
- Remove the special case for checking for LATEST_TIMESTAMP in 
MetaDataClient.updateCache()
- Have the new MetaDataMutated.updateResolvedTimestamp() method call through to 
the ConnectionQueryServices method as I don't see any harm in keeping this in 
the shared state. Only new connections would use this information, so there's 
no danger in an open transaction on an open connection using this state.

Take a look and let me know if you think it doesn't look like to big a change, 
as otherwise we could do this work later instead.

> 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-v3.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