> On Sept. 8, 2017, 1:55 p.m., Sergio Pena wrote:
> > sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/DBUpdateForwarder.java
> > Line 105 (original), 107 (patched)
> > <https://reviews.apache.org/r/62107/diff/7/?file=1818510#file1818510line112>
> >
> > Why did you change the constant here? I'm trying to remember why we
> > left this condition here. The old constan is -1 but the new you changed is
> > 0.
> >
> > I think we were trying to keep some compatibility with an old issue we
> > saw on the HDFS requests, but I don't remember.
Per Lina comment above
We should check if( seqNum > EMPTY_NOTIFICATION_ID && ...)
When client sends seqNum, it sends the inital value (-1) + 1, so the seqNum
received by sentry server is 0. And it should get full snapshot, not delta.
Definitions are below.
// number used in authz paths and permissions to request initial syncs
public static final long SEQUENCE_NUMBER_UPDATE_UNINITIALIZED = -1L;
public static final long EMPTY_NOTIFICATION_ID = 0L;
the server should receive 0 (EMPTY_NOTIFICATION_ID) in real operation, so the
input should be 0, not -1.
In UpdateableAuthzPaths, the seqNum is initialized to -1.
seqNum = new AtomicLong(SEQUENCE_NUMBER_UPDATE_UNINITIALIZED)
In SentryUpdater, the client (HDFS) sends (-1 + 1) to Sentry Server.
=============
return sentryClient.getAllUpdatesFrom(
authzInfo.getAuthzPermissions().getLastUpdatedSeqNum() + 1,
authzInfo.getAuthzPaths().getLastUpdatedSeqNum() + 1,
authzInfo.getAuthzPaths().getLastUpdatedImgNum());
=================
> On Sept. 8, 2017, 1:55 p.m., Sergio Pena wrote:
> > sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/DBUpdateForwarder.java
> > Lines 123 (patched)
> > <https://reviews.apache.org/r/62107/diff/7/?file=1818510#file1818510line128>
> >
> > Previous log messages have INFO level. I think we should set this as
> > INFO as well so that users know that a snapshot is requested but the client
> > will be delayed.
Becasue this message can occur every .5 seconds if an update is processing a
flood a info level
- Brian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62107/#review184996
-----------------------------------------------------------
On Sept. 8, 2017, 11:29 a.m., Brian Towles wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62107/
> -----------------------------------------------------------
>
> (Updated Sept. 8, 2017, 11:29 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
> -------
>
> Check the state if the SentryService to see if its doing a full update and
> delay the NN requests for a full update while thats going on.
>
>
> Diffs
> -----
>
>
> sentry-hdfs/sentry-hdfs-common/src/main/java/org/apache/sentry/hdfs/ServiceConstants.java
> 0ff717d68f146459862806d6d813f0131949777f
>
> sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/DBUpdateForwarder.java
> bb85c1381b6cd5126148596bb1637f9b3a9de5fd
>
> sentry-hdfs/sentry-hdfs-service/src/test/java/org/apache/sentry/hdfs/TestDBUpdateForwarder.java
> 830d00eb467b47ef2abcd9f55ec0133a9d395518
>
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
> 4d83ad5262e6c1a5bae3dc290a00bf9cc1a91faa
>
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollowerState.java
> PRE-CREATION
>
> 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/SentryServiceState.java
> PRE-CREATION
>
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryState.java
> PRE-CREATION
>
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryStateBank.java
> PRE-CREATION
>
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/SentryStateBankTestHelper.java
> PRE-CREATION
>
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/TestSentryStateBank.java
> PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/62107/diff/7/
>
>
> Testing
> -------
>
> Unit Tests
>
>
> Thanks,
>
> Brian Towles
>
>