> On Nov. 29, 2017, 4:50 p.m., Sergio Pena wrote:
> > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
> > Lines 251-252 (patched)
> > <https://reviews.apache.org/r/63881/diff/2/?file=1901606#file1901606line251>
> >
> > This line is making me some noise. If a user upgrades their cluster,
> > then the MSentryHmsNotification table will be empty initially; and if the
> > user does not execute any DDL command for a long time, then this message
> > will appear every 500ms on the log.
> >
> > Is this log message necessary here?
>
> Arjun Mishra wrote:
> Yeah it can be debug. I'll change it
>
> Na Li wrote:
> Sergio, in this case, sentry will keep on getting full snapshot when
> upser upgrade their cluster, and not execute any DDL command for a long time.
> It is not desirable. We should re-visit this logic on when to get full
> snapshot.
Agree. I think we should write a snapshot even if it is empty.
This below code is the one returning if an attempt to create a snapshot doesn't
do anything. We may need to persist the snapshot ID at least if it is empty.
private long createFullSnapshot() {
PathsImage snapshotInfo = client.getFullSnapshot();
if (snapshotInfo.getPathImage().isEmpty()) {
return snapshotInfo.getId();
}
}
- Sergio
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63881/#review192133
-----------------------------------------------------------
On Nov. 29, 2017, 5:43 p.m., Arjun Mishra wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63881/
> -----------------------------------------------------------
>
> (Updated Nov. 29, 2017, 5:43 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/5/
>
>
> Testing
> -------
>
> mvn -f sentry-provider/sentry-provider-db/pom.xml test
>
>
> Thanks,
>
> Arjun Mishra
>
>