----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65268/#review196494 -----------------------------------------------------------
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/HMSFollower.java Line 414 (original), 416 (patched) <https://reviews.apache.org/r/65268/#comment276160> This is unrelated change, please remove from the changeset. sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/TransactionManager.java Line 231 (original), 236 (patched) <https://reviews.apache.org/r/65268/#comment276173> Do you need both? sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/TransactionManager.java Line 242 (original) <https://reviews.apache.org/r/65268/#comment276169> It may still be useful to count number of retries and log it. I was often looking for broblems by looking at this log entry. sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/TransactionManager.java Lines 249 (patched) <https://reviews.apache.org/r/65268/#comment276171> Do you need extra () here? sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/TransactionManager.java Lines 250 (patched) <https://reviews.apache.org/r/65268/#comment276170> Why bvreak - you may adjust sleepTime to be smaller to fit within allotted time. sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/TransactionManager.java Lines 261 (patched) <https://reviews.apache.org/r/65268/#comment276174> What if this condition is false? In this case you retry immediately without sleeping sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java Lines 93 (patched) <https://reviews.apache.org/r/65268/#comment276172> The comment doesn't match the actual behavior - this is the initial sleep time. sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java Lines 95 (patched) <https://reviews.apache.org/r/65268/#comment276162> The name is confusing. In is not a retry interval but an upper bound of execution for retries. sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java Lines 96 (patched) <https://reviews.apache.org/r/65268/#comment276164> Please add time unit in the name. sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java Lines 98 (patched) <https://reviews.apache.org/r/65268/#comment276163> Can you express this via Time units? sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java Lines 102 (patched) <https://reviews.apache.org/r/65268/#comment276165> Please add time unit in the name. sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java Lines 103 (patched) <https://reviews.apache.org/r/65268/#comment276166> How did you come up with 30 sec and 90 sec numbers? sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java Lines 2593 (patched) <https://reviews.apache.org/r/65268/#comment276168> Please add comment explaining what are you testing here. Looks like the name is not telling the truth - you are testing something complicated about notifications. What you really need is a test that verifies that your failed transactions fail more or less within allotted time, but this test doesn't test for it. - Alexander Kolbasov On Jan. 29, 2018, 9:34 p.m., kalyan kumar kalvagadda wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/65268/ > ----------------------------------------------------------- > > (Updated Jan. 29, 2018, 9:34 p.m.) > > > Review request for sentry, Arjun Mishra, Na Li, Sergio Pena, and Vadim > Spector. > > > Bugs: SENTRY-1904 > https://issues.apache.org/jira/browse/SENTRY-1904 > > > Repository: sentry > > > Description > ------- > > The TransactionManager uses exponential backoff strategy for transaction > retries. This may cause some transactions to be delayed by a very long time. > We should also have a constraint on the max time for a transaction so that we > do not retry for too long. > > New patch that is attached adds upper bounds on below > > 1.Interval between the retry attempts which increases exponentially. > 2.Total time a transaction could spend in retries. > > > With out these limits we would not have a control on how long a transaction > could be be active. > > > Diffs > ----- > > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/HMSFollower.java > 2f2b984 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/TransactionManager.java > f4ff962 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java > 7e02874 > > sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestHMSFollowerSentryStoreIntegration.java > 91c90f9 > > sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java > b410027 > > > Diff: https://reviews.apache.org/r/65268/diff/4/ > > > Testing > ------- > > Made sure all the tests pass. > > > Thanks, > > kalyan kumar kalvagadda > >