Skip to content

HDDS-14447. Support multiple clients in OmMetadataGenerator#9696

Open
ivandika3 wants to merge 2 commits intoapache:masterfrom
ivandika3:HDDS-14447
Open

HDDS-14447. Support multiple clients in OmMetadataGenerator#9696
ivandika3 wants to merge 2 commits intoapache:masterfrom
ivandika3:HDDS-14447

Conversation

@ivandika3
Copy link
Contributor

@ivandika3 ivandika3 commented Feb 2, 2026

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)

Copy link
Contributor

@sreejasahithi sreejasahithi left a 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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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");

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated.

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];
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@ivandika3 ivandika3 self-assigned this Feb 3, 2026
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

Successfully merging this pull request may close these issues.

2 participants