KAFKA-12190: Fix setting of file permissions on non-POSIX filesystems#9968
Merged
ableegoldman merged 1 commit intoapache:2.6from Jan 26, 2021
Merged
KAFKA-12190: Fix setting of file permissions on non-POSIX filesystems#9968ableegoldman merged 1 commit intoapache:2.6from
ableegoldman merged 1 commit intoapache:2.6from
Conversation
Previously, StateDirectory used PosixFilePermissions to configure its directories' permissions which fails on Windows as its file system is not POSIX-compliant. This commit updates StateDirectory to fall back to the File API on non-POSIX-compliant file systems.
3 tasks
ableegoldman
approved these changes
Jan 25, 2021
Member
ableegoldman
left a comment
There was a problem hiding this comment.
Awesome, thanks for porting this to the 2.6 branch. LGTM. Will merge once the build completes
Member
|
Huh, the Java 8 & 14 builds both passed but the Java 11 build has been still in progress for a while now. Seems to be environmental -- in fact if I look at the output it actually seems all tests have passed, and it's just hanging somewhere in the shutdown 🤔 Will test out this patch locally to be safe before merging |
Member
|
Merged to 2.6 |
Contributor
Author
|
Thanks again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request back-ports to 2.6 the changes I contributed in #9947.
Previously,
StateDirectoryusedPosixFilePermissionsto configure its directories' permissions which fails on Windows as its file system is not POSIX-compliant. This PR updatesStateDirectoryto fall back to theFileAPI on non-POSIX-compliant file systems. The File API doesn't allow as much control over the permissions so they're as close as the API permits.The unit tests have been updated to also verify the behaviour on non-POSIX-compliant file systems.
Committer Checklist (excluded from commit message)