-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-16819 Possible inconsistent state of AbstractDelegationTokenSecretManager #1894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
💔 -1 overall
This message was automatically generated. |
storeDelegationKey(currentKey); | ||
} | ||
//Log must be invoked outside the lock on 'this' | ||
logUpdateMasterKey(currentKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is now happening after the store? And both generateSecret and store are now synchronized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but I'm not sure why it was placed between them. They have to be in the same synchronized block to be atomic, otherwise other threads may find that there's no key for the current id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Probably it's just the original order and then sync blocks went up around some of the ops
looking at this with a goal of getting it in to 3.3.1. Is the race condition in generating the key IDs? If so, isn't that enough to sync and we can leave the rest alone? |
No, the problem is that key id generation and store happens in distinct synchronized blocks so between the two blocks other threads can access currentKeyId which doesn't correspond to any key because it's not stored yet. |
OK., now I understand why we need this and why the PR does the right thing, Can you do rebase and forced push of the PR to kick off yetus again? |
…cretManager Change-Id: Id29a4e2471854659a7506d5d82da8e98827b6593
💔 -1 overall
This message was automatically generated. |
No description provided.