Fix to remove mkdir opration to ufs when load metadata and mount table#17572
Open
codings-dan wants to merge 1 commit intoAlluxio:master-2.xfrom
Open
Fix to remove mkdir opration to ufs when load metadata and mount table#17572codings-dan wants to merge 1 commit intoAlluxio:master-2.xfrom
codings-dan wants to merge 1 commit intoAlluxio:master-2.xfrom
Conversation
Contributor Author
| @maobaolong @jiacheliu3 Could you help take a look at the pull request? Thanks in advance! |
maobaolong approved these changes Jun 12, 2023
Contributor
maobaolong left a comment
There was a problem hiding this comment.
We discussed this offline. LGTM
jiacheliu3 reviewed Jun 16, 2023
| MkdirsOptions.defaults(Configuration.global()).setCreateParent(false) | ||
| .setOwner(dir.getOwner()).setGroup(dir.getGroup()).setMode(new Mode(dir.getMode())); | ||
| if (!ufs.mkdirs(ufsUri, mkdirsOptions)) { | ||
| if (isMetadataLoad || !ufs.mkdirs(ufsUri, mkdirsOptions)) { |
Contributor
There was a problem hiding this comment.
it's quite weird why a mount or loadMetadata will call syncPersistDirectory(). I'm not sure how that happened. What is the call stack when this happens?
Contributor Author
There was a problem hiding this comment.
Thanks for helping review the pull request! The stack trace shows below.
java.lang.Throwable at alluxio.master.file.meta.InodeTree.syncPersistDirectory(InodeTree.java:1423) at alluxio.master.file.meta.InodeTree.syncPersistExistingDirectory(InodeTree.java:1343) at alluxio.master.file.meta.InodeTree.createPath(InodeTree.java:966) at alluxio.master.file.DefaultFileSystemMaster.createDirectoryInternal(DefaultFileSystemMaster.java:2762) at alluxio.master.file.InodeSyncStream.loadDirectoryMetadataInternal(InodeSyncStream.java:1384) at alluxio.master.file.InodeSyncStream.loadDirectoryMetadata(InodeSyncStream.java:1304) at alluxio.master.file.InodeSyncStream.loadMetadata(InodeSyncStream.java:1051) at alluxio.master.file.InodeSyncStream.loadMetadataForPath(InodeSyncStream.java:1019) at alluxio.master.file.InodeSyncStream.syncInodeMetadata(InodeSyncStream.java:751) at alluxio.master.file.InodeSyncStream.syncInternal(InodeSyncStream.java:495) at alluxio.master.file.InodeSyncStream.sync(InodeSyncStream.java:413) at alluxio.master.file.DefaultFileSystemMaster.syncMetadata(DefaultFileSystemMaster.java:4100) at alluxio.master.file.TxFileSystemMaster.syncMetadata(TxFileSystemMaster.java:347) at alluxio.master.file.DefaultFileSystemMaster.listStatus(DefaultFileSystemMaster.java:1114) at alluxio.master.file.TxFileSystemMaster.listStatus(TxFileSystemMaster.java:915) at alluxio.master.file.FileSystemMasterClientServiceHandler.lambda$listStatus$10(FileSystemMasterClientServiceHandler.java:311) at alluxio.RpcUtils.callAndReturn(RpcUtils.java:129) at alluxio.master.file.FileSystemMasterClientServiceHandler.listStatus(FileSystemMasterClientServiceHandler.java:309) at alluxio.grpc.FileSystemMasterClientServiceGrpc$MethodHandlers.invoke(FileSystemMasterClientServiceGrpc.java:3867) 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.
What changes are proposed in this pull request?
Remove mkdir opration to ufs when load metadata
Why are the changes needed?
When loadMetadata or create a mount point to alluxio master, if the dir don't exist in the ufs, it will create one dir to ufs, which I think is un-necessary.
Does this PR introduce any user facing changes?
No