[
https://issues.apache.org/jira/browse/PHOENIX-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas D'Silva updated PHOENIX-1812:
------------------------------------
Attachment: PHOENIX-1812.patch
[~jamestaylor]
I added a txnReadPointer field to PTableRef and used that to determine if we
need to make the RPC. This seemed to be a cleaner way than adding a
txnReadPointer field to PTable.
I also added a test UpdateCacheIT to test that the number of rpc calls to
getTable is correct.
For SELECT queries for non-txn tables, it looks like there are two rpc calls
per query. I think this happens because in
PhoenixStatement.ExecutableSelectStatement.compilePlan it creates a
columnResolver which ends up calling MetadataClient.updateCache
and updateCache is called a second time when it compiles the query.
I just wanted to confirm that this is the correct behavior to verify in the
test.
> 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
>
>
> 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)