phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <>
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


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?
    private void openConnection() throws SQLException {
        try {
            boolean transactionsEnabled = props.getBoolean(
            this.connection = HBaseFactoryProvider.getHConnectionFactory().createConnection(this.config);
  "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) {
        } catch (IOException e) {
            throw new SQLExceptionInfo.Builder(SQLExceptionCode.CANNOT_ESTABLISH_CONNECTION)
        if (this.connection.isClosed()) { // TODO: why the heck doesn't this throw above?
            throw new SQLExceptionInfo.Builder(SQLExceptionCode.CANNOT_ESTABLISH_CONNECTION).build().buildException();

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

> ----------------------------------------------------------------------------------
>                 Key: PHOENIX-4605
>                 URL:
>             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

View raw message