Skip to content
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

Is it thread-safe that NamenodeConnection? #314

Open
sunholee opened this issue Apr 10, 2023 · 0 comments
Open

Is it thread-safe that NamenodeConnection? #314

sunholee opened this issue Apr 10, 2023 · 0 comments

Comments

@sunholee
Copy link

sunholee commented Apr 10, 2023

I have a question on the thread-safety of Client.
Client has the following fields, and NamenodeConnection seems to be guarded by its reqLock.
Is it thread-safe that NamenodeConnection?

type Client struct {
	namenode *rpc.NamenodeConnection
	options  ClientOptions

	defaults      *hdfs.FsServerDefaultsProto
	encryptionKey *hdfs.DataEncryptionKeyProto
}

If the connection is safe, then, by adding locks to other fields, I could get a thread-safe version of Client.
(I need a thread-safe fork, this is not a PR.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant