Skip to content

Lra client is started based on config instead of parameter value #175

@kikusko77

Description

@kikusko77

NarayanaLRAClient client = new NarayanaLRAClient("http://localhost:49101/lra-coordinator/lra-coordinator");

When i am testing failure of the client, I discovered that if the coordinator pasted there isnt available, it will eventually start the one from lra.coodinator.urls.

private void clusterConfig(URI coordinatorUrl) {
if (CONFIG.getOptionalValue(COORDINATOR_URLS_KEY, String.class).isEmpty()) {
this.coordinatorUrl = coordinatorUrl;
this.coordinatorCount = 1;
} else {
String coordinators = getConfigProperty(COORDINATOR_URLS_KEY, coordinatorUrl.toASCIIString());

        this.coordinatorUrl = toURI(coordinators.split(",")[0]);
        this.coordinatorCount = coordinators.chars().filter(ch -> ch == ',').count() + 1;

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/bugneeds-triageIssue which requires input from maintainers or needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions