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

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

Thanks, [~tdsilva]. We went back and forth on this, but I thought in the end we 
decided to resolve schemas as of the read timestamp, no? This looks like it's 
using the write pointer instead. At least that way we've got one consistent 
time for a transaction that we're using to resolve tables. Until metadata 
operations are transactional, that'll open the door for a mismatch if the table 
schema is updated between the read and write pointer, but once this is 
transactional, I think it'll be consistent (since the metadata operations will 
be seen by the client committing the data as well).

What happens when the table is not in the cache (so we don't know if it's 
transactional) and then it turns out to be transactional? When is the 
transaction started in that case? One slight tweak I was thinking we could do 
would be to always call startTransaction if the default is that all tables are 
transactional. We could do this after the early exit for system tables and only 
if the table is not found in the cache in MetaDataClient.updateCache. That'll 
save that extra RPC for the first reference of a table.

Thoughts?



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