> On April 27, 2017, 8:25 p.m., Hao Hao wrote: > > sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.derby.sql > > Lines 30 (patched) > > <https://reviews.apache.org/r/58808/diff/1/?file=1702015#file1702015line30> > > > > Can you explain more about why using 'signleton'and why have '15' > > length restriction here? And add a comment to it.
Idea is to restrict the the table to have only one record which has the last notification-id that sentry processed. Applicaiton should do an insert at the begining and later it should be only updates to existing record. To restrict the table to have only one record I have taken below approach 1. Added RESTRICTION column and made it a primary key 2. Have set a default value for that column. 3. JDO definition for this table will not have feild in the class for the column RESTRICTION, so application will just know NOTIFICATION_ID in the table. 4. If application tries to insert another entry into table yy mistake it will fail. - kalyan kumar ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58808/#review173252 ----------------------------------------------------------- On April 28, 2017, 8:30 p.m., kalyan kumar kalvagadda wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58808/ > ----------------------------------------------------------- > > (Updated April 28, 2017, 8:30 p.m.) > > > Review request for sentry, Alexander Kolbasov, Hao Hao, Na Li, Sergio Pena, > Vamsee Yarlagadda, and Vadim Spector. > > > Bugs: SENTRY-1726 > https://issues.apache.org/jira/browse/SENTRY-1726 > > > Repository: sentry > > > Description > ------- > > 1. Created new table to store the last notification id > 2. Table is defined to store only one entry. > > > Diffs > ----- > > > sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.derby.sql > ba70715 > > sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.mysql.sql > 879e732 > > sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.oracle.sql > e83ab83 > > sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.postgres.sql > c28099b > sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql > 841dcaa > > sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql > 223835e > > sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql > 006d57b > > sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql > 20921ea > > sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql > 489ad66 > > sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql > ec50912 > > > Diff: https://reviews.apache.org/r/58808/diff/1/ > > > Testing > ------- > > tested the sql changes with the all databases sentry supports. > > > Thanks, > > kalyan kumar kalvagadda > >
