-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[MultiNodePipelineBase] perf cluster pipeline if all the keys on same node #4148
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
Comments
} catch (JedisConnectionException jce) {
log.error("Error with connection to " + nodeKey, jce);
// cleanup the connection
// TODO these operations not thread-safe and
pipelinedResponsesIterator.remove();
connections.remove(nodeKey);
} the code also has bug. |
@xrayw The goal of this issue is to track a performance optimization in Let me know if I got it correctly |
Yes, No leak found, but the connection holding time is too long. The goal of the issue is to perf the pipeline if all the keys on same node. |
As discussed in the related PR, the connection lifecycle is bound to the Pipeline. Connection to given node is opened when the first command routed to the node is added, and closed when the pipeline is closed to ensure we are able to read command responses. #4149 introduces optimization to create an Executor pool only if more than one node needs to be contacted, otherwise, we invoke the command in the invoking thread. |
I think there are some issues at here.
jedis/src/main/java/redis/clients/jedis/MultiNodePipelineBase.java
Line 98 in 1d1b268
and do we need to clear the
pipelinedResponses
andconnections
at the end? instead of remove the exceptioned one at catch blockThe text was updated successfully, but these errors were encountered: