phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas D'Silva (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-1812) Only sync table metadata when necessary
Date Wed, 03 Jun 2015 00:45:49 GMT


Thomas D'Silva commented on PHOENIX-1812:

I added a new method getTable(PTableKey key, long txnReadPointer) that takes the txnReadPointer.

I also modified PhoenixConnection.getTable to use the txnReadPointer of the current txn if
there is one.
I didn't have to use a separate map. 
I haven't committed this yet, I have attached a patch with my changes.

public PTable getTable(PTableKey key) throws TableNotFoundException {
    	Transaction transaction = mutationState.getTransaction();
        long txnReadPointer = transaction == null ? HConstants.LATEST_TIMESTAMP : transaction.getReadPointer();
    	return metaData.getTable(key, txnReadPointer);

> Only sync table metadata when necessary
> ---------------------------------------
>                 Key: PHOENIX-1812
>                 URL:
>             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

View raw message