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

[STORM-3054] Add Topology level configuration socket timeout for DRPC Invocation Client #2651

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

kishorvpatil
Copy link
Contributor

This patch fixes following this:

  • Add Topology level configuration socket timeout for DRPC Invocation Client
  • Fix the _clients map key in ReturnResults
  • Add ReturnResults debug log entries.

}

private String getServer(String host, int port) {
return host + port;
Copy link
Contributor

Choose a reason for hiding this comment

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

Better to keep it as List since bad case could be happen (when host ends with number).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverting to List.

@@ -103,21 +85,32 @@ public void execute(Tuple input) {
LOG.error("Failed to return results to DRPC server", tex);
_collector.fail(input);
}
reconnectClient((DRPCInvocationsClient) client);
client = getDRPCClient(host, port);
Copy link
Contributor

Choose a reason for hiding this comment

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

Now it always reuse the existing client even TException is being raised from the client. I guess we need to handle the case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is same as before, if we could not make connection. or reconnect failed in previous case. The whole reason to create new client from scratch in getDCPClient is to avoid using reconnect with security enabled. The stale connection fails to respond to security challenge.

Copy link
Contributor

Choose a reason for hiding this comment

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

@kishorvpatil
I meant we don't invalidate broken client from _clients so it will always pick same client, instead of rebuilding new client.

@revans2
Copy link
Contributor

revans2 commented May 14, 2018

@kishorvpatil any update on the comments from @HeartSaVioR ?

@kishorvpatil
Copy link
Contributor Author

@HeartSaVioR @revans2 sorry for delay in addressing the review comments.

};
if (!_clients.containsKey(server)) {
try {
DRPCInvocationsClient oldClient = _clients.put(server, new DRPCInvocationsClient(_conf, host, port));
Copy link
Contributor

Choose a reason for hiding this comment

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

Now it loses the cache functionality. Instead of this approach, can we invalidate cache when we find that the client is broken?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants