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

kalyan kumar kalvagadda edited comment on SENTRY-1614 at 1/26/17 1:55 PM:
--------------------------------------------------------------------------

*Here is the analysis done:*

one of the tables added as part of sentry HA, MAUTHZPATHSMAPPING_PATHS had a 
column of size VARCHAR(4000) as part of the primary key. This is the reason.

{noformat}
CREATE TABLE `MAUTHZPATHSMAPPING_PATHS`
(
    `AUTHZ_OBJ_ID_OID` BIGINT NOT NULL,
    `PATHS` VARCHAR(500) BINARY NOT NULL,
    CONSTRAINT `MAUTHZPATHSMAPPING_PATHS_PK` PRIMARY KEY 
(`AUTHZ_OBJ_ID_OID`,`PATHS`)
) ENGINE=INNODB;
{noformat}

We need to evaluate if we need PATHS part of primary key and take appropriate 
direction.


was (Author: kkalyan):
Here is the analysis done:

one of the tables added as part of sentry HA, MAUTHZPATHSMAPPING_PATHS had a 
column of size VARCHAR(4000) as part of the primary key. This is the reason.

{noformat}
CREATE TABLE `MAUTHZPATHSMAPPING_PATHS`
(
    `AUTHZ_OBJ_ID_OID` BIGINT NOT NULL,
    `PATHS` VARCHAR(500) BINARY NOT NULL,
    CONSTRAINT `MAUTHZPATHSMAPPING_PATHS_PK` PRIMARY KEY 
(`AUTHZ_OBJ_ID_OID`,`PATHS`)
) ENGINE=INNODB;
{noformat}

We need to evaluate if we need PATHS part of primary key and take appropriate 
direction.

> DB Schme Init is failing on sentry HA branch
> --------------------------------------------
>
>                 Key: SENTRY-1614
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1614
>             Project: Sentry
>          Issue Type: Bug
>            Reporter: kalyan kumar kalvagadda
>
> When a schema tool is used to initialize sentry database schema we observing  
> issue and the initialization of schema fails. Here are the details of the 
> failure.
> *Error: Specified key was too long; max key length is 767 bytes*
> {noformat}
> Error: Specified key was too long; max key length is 767 bytes 
> (state=42000,code=1071)
> Closing: 0: jdbc:mysql://192.168.56.103/sentry_db1
> org.apache.sentry.core.common.exception.SentryUserException: Schema 
> initialization FAILED! Metastore state would be inconsistent !!
> *** Sentry schemaTool failed ***
> {noformat}



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

Reply via email to