Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid getting meta sync lock if no need
### What changes are proposed in this pull request? Avoid getting meta sync lock if no need. ### Why are the changes needed? After backporting Alluxio#16241, "ls /" encountered the following exception ``` 2023-03-30 14:00:51,657 ERROR FileSystemMasterClientServiceHandler - Exit (Error): ListStatus: request=path: "/" options { loadMetadataType: ONCE commonOptions { syncIntervalMs: 86400000 ttl: -1 ttlAction: DELETE } recursive: false loadMetadataOnly: false } java.lang.RuntimeException: Call cancelled by trackers: GRPC_CLIENT_TRACKER at alluxio.master.file.RpcContext.throwIfCancelled(RpcContext.java:107) at alluxio.master.file.InodeSyncStream.sync(InodeSyncStream.java:322) at alluxio.master.file.DefaultFileSystemMaster.syncMetadata(DefaultFileSystemMaster.java:3816) at alluxio.master.file.DefaultFileSystemMaster.listStatus(DefaultFileSystemMaster.java:1042) ... ``` We found that "ls /" was waiting for the WRITE lock of "/" in MetadataSyncLockManager even it did not need to sync metadata. As other clients were "ls" other paths and they hold READ lock on "/", "ls /" got stuck. ### Does this PR introduce any user facing changes? NO pr-link: Alluxio#17172 change-id: cid-405084e218b150b4ffcce08294b30b3dd867a309
- Loading branch information