Skip to content

Conversation

@simplynaveen20
Copy link
Member

Adding preferred region option in ctl workload for DR drill

Copy link
Contributor

@moderakh moderakh left a comment

Choose a reason for hiding this comment

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

Thanks Naveen. nice addition. two minor comments.

private boolean manageDatabase = false;

@Parameter(names = "-preferredRegionsList", description = "Comma separated preferred regions list")
private String preferredRegionsList;
Copy link
Contributor

@moderakh moderakh Jul 21, 2021

Choose a reason for hiding this comment

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

as a side, note, Configuration.java should hide all the config parsing capabilities.
see 3.1. Custom types - Single value section from the following list for how to pass a list and parse a list.
https://jcommander.org/

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for suggestion ,added the string to list converter

if (preferredArray != null && preferredArray.length > 0) {
preferredRegions = new ArrayList<>(Arrays.asList(preferredArray));
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

please factor out this code outside of the AsyncCtlWorkload.java to be used by all benchmark components.

@Parameter(names = "-manageDatabase", description = "Control switch for creating/deleting underlying database resource")
private boolean manageDatabase = false;

@Parameter(names = "-preferredRegionsList", description = "Comma separated preferred regions list")
Copy link
Contributor

@moderakh moderakh Jul 21, 2021

Choose a reason for hiding this comment

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

this is a useful config, as we are adding a global config to the benchmark tool, could you please pass this config to the other components in the benchmark tool as well? as we are adding the config to the main configuration we should support it everywhere. otherwise will be confusing when we use the non ctl workloads why this config doesn't work.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was debating it originally , now you mentioned that i added for all the workload. Thanks !

Copy link
Contributor

@moderakh moderakh left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks Naveen.

two minor comments:

  1. this is a useful config, as we are adding a global config to the benchmark tool, could you please pass this config to the other components in the benchmark tool as well? as we are adding the config to the main configuration we should support it everywhere. otherwise will be confusing when we use the non ctl workload

  2. as a side note, Configuration.java should hide all the config parsing capabilities.
    see 3.1. Custom types - Single value section from the following list for how to pass a list and parse a list.
    https://jcommander.org/

}

private void createClients() {
private void createClients(Configuration cfg) {
Copy link
Member

Choose a reason for hiding this comment

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

We already have the configuration object in this class, why do we need to create a separate one ?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was the same object , however redundant reference , removed it now. Thanks

@simplynaveen20 simplynaveen20 merged commit 0f976ef into Azure:main Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants