phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-4605) Add TRANSACTION_PROVIDER and DEFAULT_TRANSACTION_PROVIDER instead of using boolean
Date Tue, 13 Feb 2018 21:08:00 GMT

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

James Taylor commented on PHOENIX-4605:
---------------------------------------

FYI, [~ohads]. Not sure what we should do about QueryServices.TRANSACTIONS_ENABLED (currently
a boolean as well). Maybe it should contain a list of supported/configured transaction providers?
We use that mostly in tests, but we also use it when we open a cluster connection to conditionally
establish a connection to the transaction manager. Is there any initialization required for
Omid along these lines? If so, should we add a new TAL method?
{code}
    private void openConnection() throws SQLException {
        try {
            boolean transactionsEnabled = props.getBoolean(
                    QueryServices.TRANSACTIONS_ENABLED,
                    QueryServicesOptions.DEFAULT_TRANSACTIONS_ENABLED);
            this.connection = HBaseFactoryProvider.getHConnectionFactory().createConnection(this.config);
            GLOBAL_HCONNECTIONS_COUNTER.increment();
            logger.info("HConnection established. Stacktrace for informational purposes: "
+ connection + " " +  LogUtil.getCallerStackTrace());
            // only initialize the tx service client if needed and if we succeeded in getting
a connection
            // to HBase
            if (transactionsEnabled) {
                initTxServiceClient();
            }
        } catch (IOException e) {
            throw new SQLExceptionInfo.Builder(SQLExceptionCode.CANNOT_ESTABLISH_CONNECTION)
            .setRootCause(e).build().buildException();
        }
        if (this.connection.isClosed()) { // TODO: why the heck doesn't this throw above?
            throw new SQLExceptionInfo.Builder(SQLExceptionCode.CANNOT_ESTABLISH_CONNECTION).build().buildException();
        }
    }
{code}

One more check needed would be in MutationState to disallow updates to both Tephra and Omid
tables in the same transaction.


> Add TRANSACTION_PROVIDER and DEFAULT_TRANSACTION_PROVIDER instead of using boolean
> ----------------------------------------------------------------------------------
>
>                 Key: PHOENIX-4605
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4605
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Priority: Major
>
> We should deprecate QueryServices.DEFAULT_TABLE_ISTRANSACTIONAL_ATTRIB and instead have
a QueryServices.DEFAULT_TRANSACTION_PROVIDER now that we'll have two transaction providers:
Tephra and Omid. Along the same lines, we should add a TRANSACTION_PROVIDER column to SYSTEM.CATALOG
 and stop using the IS_TRANSACTIONAL table property. For backwards compatibility, we can assume
the provider is Tephra if the existing properties are set to true.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message