----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63424/#review191739 -----------------------------------------------------------
The index for AUTHZ_SNAPSHOT_ID is ok to keep it. If we have multiple snapshots persisted, then our queries will be faster if we index per snapshotID. Sentry does not delete old snapshots yet, so this is useful. Also, you need to update the sentry-upgrade-db2-1.8.0-2.0.0.sql file as well. - Sergio Pena On Nov. 21, 2017, 11:46 p.m., Na Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/63424/ > ----------------------------------------------------------- > > (Updated Nov. 21, 2017, 11:46 p.m.) > > > Review request for sentry, Arjun Mishra, kalyan kumar kalvagadda, and Sergio > Pena. > > > Repository: sentry > > > Description > ------- > > AUTHZ_OBJ_NAME has (384) chars. It is defieved from DB_NAME and TBL_NAME from > hive. the constrain AUTHZOBJNAME will have error "Specified key was too long; > max key length is 767 bytes" for mysql. > > Since this index does not have much benefit, the solution is to drop the > index includes this field, so it works for mysql regardless the char set of > its table or DB. > > > Diffs > ----- > > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo > 2f2aabb > > sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.derby.sql > 13708ba > > sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.mysql.sql > a7db1b7 > > sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.oracle.sql > ebb981a > > sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.postgres.sql > e0b560c > sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-2.0.0.sql > 2c1268a > > sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-2.0.0.sql > 1c51049 > > sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-2.0.0.sql > 9f61154 > > sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-2.0.0.sql > 58241e5 > > sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-2.0.0.sql > 5d52136 > > > Diff: https://reviews.apache.org/r/63424/diff/2/ > > > Testing > ------- > > tested on system > > > Thanks, > > Na Li > >