You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by F21 <f2...@gmail.com> on 2016/10/06 07:58:33 UTC
Which statements are supported when using transactions?
I just ran into the following scenario with Phoenix 4.8.1 and HBase 1.2.3.
1. Create a transactional table: CREATE TABLE schemas(version varchar
not null primary key) TRANSACTIONAL=true
2. Confirm it exists/is created: SELECT * FROM schemas
3. Begin transaction.
4. Insert into schemas: UPSERT INTO schemas (version) VALUES
('some-release')
5. Also create a table: CREATE TABLE test_table (id integer not null
primary key)
6. Commit the transaction.
Once the transaction has been committed, I can see that test_table is
created. However, the schemas table is missing the 'some-release' entry.
Which statements do not support transactions? In MySQL, things like
CREATE TABLE, etc are non-transactional and would implicitly commit.
What is the case with Phoenix? It seems a bit odd that the table is
created, but the UPSERT has not effect, event after committing the
transaction.
Cheers,
Francis
Re: Which statements are supported when using transactions?
Posted by Thomas D'Silva <td...@salesforce.com>.
Francis,
Can you please file a JIRA for this?
Thanks,
Thomas
On Thu, Oct 6, 2016 at 12:58 AM, F21 <f2...@gmail.com> wrote:
> I just ran into the following scenario with Phoenix 4.8.1 and HBase 1.2.3.
>
> 1. Create a transactional table: CREATE TABLE schemas(version varchar not
> null primary key) TRANSACTIONAL=true
>
> 2. Confirm it exists/is created: SELECT * FROM schemas
>
> 3. Begin transaction.
>
> 4. Insert into schemas: UPSERT INTO schemas (version) VALUES
> ('some-release')
>
> 5. Also create a table: CREATE TABLE test_table (id integer not null
> primary key)
>
> 6. Commit the transaction.
>
> Once the transaction has been committed, I can see that test_table is
> created. However, the schemas table is missing the 'some-release' entry.
>
>
> Which statements do not support transactions? In MySQL, things like CREATE
> TABLE, etc are non-transactional and would implicitly commit. What is the
> case with Phoenix? It seems a bit odd that the table is created, but the
> UPSERT has not effect, event after committing the transaction.
>
> Cheers,
>
> Francis
>
>