Skip to content
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

SDK-17 Fixed external LoadBalanced config #101

Merged
merged 6 commits into from
Mar 18, 2020

Conversation

thibauult
Copy link
Member

@thibauult thibauult commented Mar 18, 2020

The external LoadBalanced was broken or has never worked as expected. This PR is more a patch than a real clean fix, knowing that the DFv2 will provide a real scalable solution "by design".

SymConfig.java

The method getAgentUrl() was using field this.agentHost to compute the full Agent server url. Instead, it has to use this.getAgentHost() because this method is overridden in SymLoadBalancedConfig.java.

SymLoadBalancedConfig.java

The way that the method public String getActualAgentHost() has been implemented was wrong :

String externalAgentHost = (agentServers != null && agentServers.size() > 0) ?
            agentServers.get(0) : getAgentHost();

It was apparently trying to get LB host from the Agent servers defined in the config-lb.json file. Moreover, having agentServers empty could have lead to a never-ending recursive loop with de subsequent call to getAgentHost()...

@symphonydarlys
Copy link
Contributor

LGTM

@thibauult thibauult merged commit b110cee into finos:master Mar 18, 2020
@thibauult thibauult deleted the PLAT-8796_Fix-load-balancing branch March 18, 2020 14:59
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