[ 
https://issues.apache.org/jira/browse/TRAFODION-743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Suresh Subbiah resolved TRAFODION-743.
--------------------------------------
    Resolution: Fixed

> LP Bug: 1389871 - Failed table creation does not clean up constraints
> ---------------------------------------------------------------------
>
>                 Key: TRAFODION-743
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-743
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-exe
>            Reporter: Weishiun Tsai
>            Assignee: Anoop Sharma
>            Priority: Blocker
>
> When a table creation with constraints failed, constraints are not cleaned up 
> from hbase after the error.  This often leads to inconsistent metadata 
> between hbase and trafodion.  In some cases, it also causes a Trafodion 
> schema to become un-droppable.
> As shown here, the table creation fails with error 1254.   Drop schema 
> cascade returns success.  But from hbase, it shows that the 2 constraints 
> remain in hbase.
> This is seen on the v1104_0830 build installed on a cluster.  Since this is 
> one of the many causes that lead to inconsistent Trafodion metadata, the bug 
> report is marked as critical.
> ------------------------------------
> Here is the entire script to reproduce this problem:
> set schema TESTSCH;
> create table n6a3
> (c1 date not null not droppable,
> c2 time not null not droppable,
> c3 timestamp not null not droppable,
> unique (c2,c1),
> unique (c2,c1)) no partition;
> drop schema TESTSCH cascade;
> ------------------------------------
> Here is the execution output from sqlci:
> >>set schema TESTSCH;
> --- SQL operation complete.
> >>
> >>create table n6a3
> +>(c1 date not null not droppable,
> +>c2 time not null not droppable,
> +>c3 timestamp not null not droppable,
> +>unique (c2,c1),
> +>unique (c2,c1)) no partition;
> *** ERROR[1254] Duplicate unique constraints are not allowed with same set of 
> columns.
> *** ERROR[1029] Object TRAFODION.TESTSCH.N6A3 could not be created.
> --- SQL operation failed with errors.
> >>
> >>drop schema TESTSCH cascade;
> --- SQL operation complete.
> ------------------------------------
> Here is the hbase shell showing that the 2 constraints remain there even 
> after drop schema cascade:
> [trafodion@n009 scripts]$ hbase shell
> 14/11/05 21:25:54 INFO Configuration.deprecation: hadoop.native.lib is 
> deprecated. Instead, use io.native.lib.available
> HBase Shell; enter 'help<RETURN>' for list of supported commands.
> Type "exit<RETURN>" to leave the HBase Shell
> Version 0.98.1-cdh5.1.3, rUnknown, Tue Sep 16 20:19:34 PDT 2014
> hbase(main):001:0> list 'TRAFODION.TESTSCH.*'
> TABLE
> TRAFODION.TESTSCH.N6A3_417892148_3391
> TRAFODION.TESTSCH.N6A3_973213148_3391
> 2 row(s) in 2.6540 seconds
> => ["TRAFODION.TESTSCH.N6A3_417892148_3391", 
> "TRAFODION.TESTSCH.N6A3_973213148_3391"]
> hbase(main):002:0>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to