[
https://issues.apache.org/jira/browse/PHOENIX-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14703748#comment-14703748
]
Thomas D'Silva commented on PHOENIX-1812:
-----------------------------------------
[~jamestaylor]
If we scale the txn read pointer down by 1 million, do we have to worry about
multiple transactions occurring in one millisecond? If one of them changes the
table metadata, will a later transaction be able to view the change (or will it
only view the table metadata as of the start)?
In MetaDataClient.updateCache() I used connection.getResolvedTime(result) as
the resolved time while adding a table or while updating the resolved time
stamp since this will set the timestamp to the mutation time for non txn and
scn cases.
{code}
public long getResolvedTime(MetaDataMutationResult result) {
PTable table = result.getTable();
Transaction transaction = mutationState.getTransaction();
return (scn!=null && table!=null && scn > table.getTimeStamp()) ? scn :
transaction == null ? result.getMutationTime() : transaction.getReadPointer();
}
{code}
If we don't pass the resolved time to addIndexesFromPhysicalTable it will just
call getResolvedTimestamp from updateCache and this would be exactly the same
as passing the resolved time, right?
In getTableStats() should I just used the new getResolvedTimestamp()
{code}
if (isSharedIndex) {
return
connection.getQueryServices().getTableStats(table.getPhysicalName().getBytes(),
getResolvedTimestamp());
}
{code}
> 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-v4-WIP.patch, PHOENIX-1812-v5.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)