[
https://issues.apache.org/jira/browse/SENTRY-1931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16157907#comment-16157907
]
Hadoop QA commented on SENTRY-1931:
-----------------------------------
Here are the results of testing the latest attachment
https://issues.apache.org/jira/secure/attachment/12885937/SENTRY-1931.1.patch
against master.
{color:green}Overall:{color} +1 all checks pass
{color:green}SUCCESS:{color} all tests passed
Console output:
https://builds.apache.org/job/PreCommit-SENTRY-Build/3264/console
This message is automatically generated.
> NameNode only gets full snapshot once
> -------------------------------------
>
> Key: SENTRY-1931
> URL: https://issues.apache.org/jira/browse/SENTRY-1931
> Project: Sentry
> Issue Type: Bug
> Components: Sentry
> Affects Versions: 2.0.0
> Reporter: Alexander Kolbasov
> Assignee: Sergio Peña
> Fix For: 2.0.0
>
> Attachments: SENTRY-1931.1.patch
>
>
> SENTRY-1815 introduced the notion of ImageID, but it turns out that it
> doesn't work quite as expected.
> The problem is that when we send partial update the image number isn't set:
> {code}
> public List<PathsUpdate> retrieveDelta(long seqNum) throws Exception {
> ...
> List<PathsUpdate> updates = new ArrayList<>(mSentryPathChanges.size());
> for (MSentryPathChange mSentryPathChange : mSentryPathChanges) {
> // Gets the changeID from the persisted MSentryPathChange.
> long changeID = mSentryPathChange.getChangeID();
> // Creates a corresponding PathsUpdate and deserialize the
> // persisted delta update in JSON format to TPathsUpdate with
> // associated changeID.
> PathsUpdate pathsUpdate = new PathsUpdate();
> pathsUpdate.JSONDeserialize(mSentryPathChange.getPathChange());
> pathsUpdate.setSeqNum(changeID);
> updates.add(pathsUpdate);
> }
> return updates;
> }
> }
> {code}
> When it isn't set, thrift uses -1 as the default (as specified in our Thrift
> file).
> The code in {{UpdateableAuthzPaths.updatePartial}} does this:
> {code}
> @Override
> public void updatePartial(Iterable<PathsUpdate> updates, ReadWriteLock
> lock) {
> for (PathsUpdate update : updates) {
> applyPartialUpdate(update);
> seqNum.set(update.getSeqNum());
> imgNum.set(update.getImgNum()); // Here
> }
> }
> {code}
> so we set imgNum to -1 when we receive any partial update and then we always
> request for all updates from -1 and never receive a full update.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)