[jira] [Commented] (PHOENIX-4605) Add TRANSACTION_PROVIDER and DEFAULT_TRANSACTION_PROVIDER instead of using boolean
[ https://issues.apache.org/jira/browse/PHOENIX-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16434767#comment-16434767 ] James Taylor commented on PHOENIX-4605: --- Attached WIP3 that passed at least TransactionIT. Will run tests locally next. > 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 >Assignee: James Taylor >Priority: Major > Attachments: PHOENIX-4605_wip1.patch, PHOENIX-4605_wip2.patch, > PHOENIX_4605_wip3.patch > > > 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)
[jira] [Commented] (PHOENIX-4605) Add TRANSACTION_PROVIDER and DEFAULT_TRANSACTION_PROVIDER instead of using boolean
[ https://issues.apache.org/jira/browse/PHOENIX-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16434633#comment-16434633 ] James Taylor commented on PHOENIX-4605: --- Attached WIP2 patch that fixes TAL and requires a transaction provider to always be required to get the correct PhoenixTransactionProvider interface to use based on the table. > 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 >Assignee: James Taylor >Priority: Major > Attachments: PHOENIX-4605_wip1.patch, PHOENIX-4605_wip2.patch > > > 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)
[jira] [Commented] (PHOENIX-4605) Add TRANSACTION_PROVIDER and DEFAULT_TRANSACTION_PROVIDER instead of using boolean
[ https://issues.apache.org/jira/browse/PHOENIX-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16428855#comment-16428855 ] James Taylor commented on PHOENIX-4605: --- Attached WIP patch that adds TRANSACTION_PROVIDER and a property to set the default. Need to thread the transaction provider byte between client and server and use on client to determine TransactionProvider interface to use next. > 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 >Assignee: James Taylor >Priority: Major > Attachments: PHOENIX-4605_wip1.patch > > > 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)
[jira] [Commented] (PHOENIX-4605) Add TRANSACTION_PROVIDER and DEFAULT_TRANSACTION_PROVIDER instead of using boolean
[ https://issues.apache.org/jira/browse/PHOENIX-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16365311#comment-16365311 ] Ohad Shacham commented on PHOENIX-4605: --- Lazily sounds good. I wouldn't initialize Omid client if we don't have a transaction manager running. > 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)
[jira] [Commented] (PHOENIX-4605) Add TRANSACTION_PROVIDER and DEFAULT_TRANSACTION_PROVIDER instead of using boolean
[ https://issues.apache.org/jira/browse/PHOENIX-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16364815#comment-16364815 ] James Taylor commented on PHOENIX-4605: --- Yep, that’s more or less what I’m proposing. We’d need to potentially initialize both transaction engines when we establish the connection to a cluster, though. Or perhaps better would be to establish this lazily the first time a transaction starts. > 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)
[jira] [Commented] (PHOENIX-4605) Add TRANSACTION_PROVIDER and DEFAULT_TRANSACTION_PROVIDER instead of using boolean
[ https://issues.apache.org/jira/browse/PHOENIX-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16364534#comment-16364534 ] Geoffrey Jacoby commented on PHOENIX-4605: -- [~jamestaylor] - could there be a table-level override of the global hbase-site.xml setting, with a validation check to make sure that tables from two different TALs can't participate in a transaction with each other? That would allow you to have a global setting of "Tephra", but experiment with Omid on new tables. > 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)
[jira] [Commented] (PHOENIX-4605) Add TRANSACTION_PROVIDER and DEFAULT_TRANSACTION_PROVIDER instead of using boolean
[ https://issues.apache.org/jira/browse/PHOENIX-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16364326#comment-16364326 ] James Taylor commented on PHOENIX-4605: --- If we assume that either Tephra or Omid is in use, but not both, then we’re fine with having a config that defines which TAL implementation to use (or unset if translations are disabled). If a user already has Tephra tables, this doesn’t work well, though, as they couldn’t try Omid without breaking their app. > 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)
[jira] [Commented] (PHOENIX-4605) Add TRANSACTION_PROVIDER and DEFAULT_TRANSACTION_PROVIDER instead of using boolean
[ https://issues.apache.org/jira/browse/PHOENIX-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16364028#comment-16364028 ] Ohad Shacham commented on PHOENIX-4605: --- initTxServiceClient is calling function setTransactionClient that was declared at the TAL. It uses the TransactionFactory to get the context and the TransactionFactory generates the context according to the defined transaction processor. Is it possible to set the transaction processor inside the TransactionFactory and leave this code as it is? Read an option for hbase_site.xml? This way we have a var that defines whether to use transactions and one (inside the TransactionFactory) that defines which transaction processor to use. What do you say [~jamestaylor]? > 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)
[jira] [Commented] (PHOENIX-4605) Add TRANSACTION_PROVIDER and DEFAULT_TRANSACTION_PROVIDER instead of using boolean
[ 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)