> On Nov. 27, 2017, 6:22 p.m., Na Li wrote:
> > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
> > Lines 351 (patched)
> > <https://reviews.apache.org/r/63881/diff/2/?file=1901606#file1901606line351>
> >
> >     this should be debug level or log once only every hour. Otherwise, the 
> > log could be flooded by this message.

isLeader() method is called in HMSFollower run() method as well. So if one of 
the services is not a leader we ideally should never call syncupWithHms() 
method. The only time this can happen is at the time we called the 
syncupWithHms() method it was a leader, but by the time we called 
createFullSnapshot() method it was not a leader. This seems like a rare case. 
That's why I don't think it should flood the logs.


> On Nov. 27, 2017, 6:22 p.m., Na Li wrote:
> > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
> > Lines 360 (patched)
> > <https://reviews.apache.org/r/63881/diff/2/?file=1901606#file1901606line362>
> >
> >     this should be debug level to avoid too many messages.

This should happen only when createFullSnapShot is being triggered, 
snapshot.getPathImage() is not empty, and HDFSSync is disabled. It shouldn't 
occur that often in my opinion. We only call createFullSnapshot if sentry HMS 
notification table is empty, or sentry-hms are out of sync. Can you explain in 
what scenario this will flood the log?


- Arjun


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63881/#review191907
-----------------------------------------------------------


On Nov. 27, 2017, 4:39 p.m., Arjun Mishra wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63881/
> -----------------------------------------------------------
> 
> (Updated Nov. 27, 2017, 4:39 p.m.)
> 
> 
> Review request for sentry, kalyan kumar kalvagadda, Na Li, Sergio Pena, and 
> Vadim Spector.
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Currently we only seem to log when all conditions that lead to getting a 
> snapshot are validated, and eventually a full snapshot is received. However, 
> if for some reason a particular condition was invalid we don't log as to why. 
> This leaves no room for knowing definitely what might have been the reason as 
> to why a snapshot was not received from HMS.
> 
> 
> Diffs
> -----
> 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
>  f32a745ed 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
>  c1471d118 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryHMSClient.java
>  eccb40fb6 
> 
> 
> Diff: https://reviews.apache.org/r/63881/diff/2/
> 
> 
> Testing
> -------
> 
> mvn -f sentry-provider/sentry-provider-db/pom.xml test
> 
> 
> Thanks,
> 
> Arjun Mishra
> 
>

Reply via email to