LuciferYang opened a new pull request, #14416: URL: https://github.com/apache/gravitino/pull/14416
### What changes were proposed in this pull request? `getFileSystem` and `probeLocation` read the current user in the request thread and pass it to `createFileSystem`, which gives that fixed value to `ImpersonationHDFSFileSystemProxy` instead of a supplier that runs on the pool thread. ### Why are the changes needed? A pool thread keeps the `Subject` of the request that started it, so with impersonation enabled a file system created there could act for an earlier user. Fix: #14415 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? New `testGetFileSystemUsesRequestUserOnPoolThread` and `testTestConnectionUsesRequestUserOnPoolThread`: the pool threads are started under alice, then bob calls `getFileSystem` or `testConnection`, and the file system must be created for bob on a thread that carries alice's `Subject`. New `testHdfsFileSystemProxyUsesGivenUser`: the user handler passed to `ImpersonationHDFSFileSystemProxy` returns bob even when called under alice's `Subject`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
