----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/62107/#review184628 -----------------------------------------------------------
sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/DBUpdateForwarder.java Line 83 (original), 82 (patched) <https://reviews.apache.org/r/62107/#comment260805> The condition can change right after we read it but probably it is Ok in this case. sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/DBUpdateForwarder.java Lines 83 (patched) <https://reviews.apache.org/r/62107/#comment260802> Remove else - previous clause ends with return sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/DBUpdateForwarder.java Lines 84 (patched) <https://reviews.apache.org/r/62107/#comment260804> "A full update is running loading" - this is a bit confusing. Can you refrase the message? sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/DBUpdateForwarder.java Line 84 (original), 86 (patched) <https://reviews.apache.org/r/62107/#comment260803> We check for the condition twice which makes logic a bit convoluted. Can you refactor it to check only once? if (curImgNum > imgNum) { if (full_update) { return empty list } return full image } sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/DBUpdateForwarder.java Lines 119 (patched) <https://reviews.apache.org/r/62107/#comment260806> Should we add a log here as well? sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java Lines 54 (patched) <https://reviews.apache.org/r/62107/#comment260809> The way you are using it volatile is good enough, but Atomic works as well. sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java Lines 104 (patched) <https://reviews.apache.org/r/62107/#comment260807> The first sentence should end with dot. return what? May be just @return True if collecting full HMS snapshot is in progress sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java Lines 297 (patched) <https://reviews.apache.org/r/62107/#comment260808> Can you add check (with preconditions) that it is set to false at the beginning - like an assert statement? sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceFactory.java Lines 18 (patched) <https://reviews.apache.org/r/62107/#comment260810> This is unused import sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceFactory.java Line 24 (original), 33 (patched) <https://reviews.apache.org/r/62107/#comment260811> should this be static as well? Do we need to be concerned with concurrency? - Alexander Kolbasov On Sept. 6, 2017, 2:25 a.m., Brian Towles wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/62107/ > ----------------------------------------------------------- > > (Updated Sept. 6, 2017, 2:25 a.m.) > > > Review request for sentry, Alexander Kolbasov, Arjun Mishra, Na Li, Sergio > Pena, and Vadim Spector. > > > Bugs: SENTRY-1918 > https://issues.apache.org/jira/browse/SENTRY-1918 > > > Repository: sentry > > > Description > ------- > > Added fix to limit sending back of full snapshot when the HMSFollower is > pulling a full snapshot > > > Diffs > ----- > > > sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/DBUpdateForwarder.java > 5d744214e14d6c48194b3a0bf84d6e10070b020a > > sentry-hdfs/sentry-hdfs-service/src/test/java/org/apache/sentry/hdfs/TestDBUpdateForwarder.java > 8fbc10048003ab4b8a38676e241ae0fd27d2392c > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java > d4feb380fa0f3bd5f237609a107295a2d23eae3b > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java > d44abffc199cd46d3ab7d2230dfdb2075736a8f0 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceFactory.java > 1685702c6dbc9715c8885a29a80bc68509550f0b > > > Diff: https://reviews.apache.org/r/62107/diff/2/ > > > Testing > ------- > > Unit Tests > > > Thanks, > > Brian Towles > >
