-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-14447. Support multiple clients in OmMetadataGenerator #9696
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
base: master
Are you sure you want to change the base?
Conversation
sreejasahithi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ivandika3 for working on this , left few comments below
| } | ||
| } | ||
| if (followerOMNodeIds.isEmpty()) { | ||
| throw new IllegalArgumentException("There is no follower the OM service, please retry again"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| throw new IllegalArgumentException("There is no follower the OM service, please retry again"); | |
| throw new IllegalArgumentException("There is no follower in the OM service, please retry again"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated.
| if (clientsNo <= 0) { | ||
| clientsNo = 1; | ||
| } | ||
|
|
||
| try (OzoneClient ozClient = createOzoneClient(omServiceID, conf)) { | ||
| ensureVolumeAndBucketExist(ozClient, volumeName, bucketName); | ||
|
|
||
| ozoneClients = new OzoneClient[clientsNo]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description of "--clients" states that "If the number of clients exceeds number of threads N, only N clients will be created." However, this validation does not seem to be present in the code. Currently we only check if clientsNo <= 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated the description accordingly. Clients can exceed N number of threads for flexibility purpose.
What changes were proposed in this pull request?
Currently OmMetadataGenerator only creates a single client which is shared by all the threads. This is not suitable to test OM follower read since a single client will only stick with a single OM most of the time. We want to be able to create more clients so that the client workloads will be spread out to all the OM nodes. Also we can support an option to allow clients to initially only connect to OM followers to test follower affinity performance.
We can specify the number of clients needed.
The default number of clients is 1 to preserve compatibility.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14447
How was this patch tested?
CI (https://github.com/ivandika3/ozone/actions/runs/21566024816)