HDDS-14447. Support multiple clients in OmMetadataGenerator#9696
Open
ivandika3 wants to merge 2 commits intoapache:masterfrom
Open
HDDS-14447. Support multiple clients in OmMetadataGenerator#9696ivandika3 wants to merge 2 commits intoapache:masterfrom
ivandika3 wants to merge 2 commits intoapache:masterfrom
Conversation
Contributor
sreejasahithi
left a comment
There was a problem hiding this comment.
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"); |
Contributor
There was a problem hiding this comment.
Suggested change
| 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"); |
Comment on lines
+187
to
+194
| if (clientsNo <= 0) { | ||
| clientsNo = 1; | ||
| } | ||
|
|
||
| try (OzoneClient ozClient = createOzoneClient(omServiceID, conf)) { | ||
| ensureVolumeAndBucketExist(ozClient, volumeName, bucketName); | ||
|
|
||
| ozoneClients = new OzoneClient[clientsNo]; |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
Thanks, updated the description accordingly. Clients can exceed N number of threads for flexibility purpose.
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 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)