Skip to content

Commit

Permalink
Revert "Fix memory/breaker leaks for outbound responses(elastic#76474)
Browse files Browse the repository at this point in the history
…elastic#76536"

This reverts commit 411e5e7
  • Loading branch information
[email protected] committed Aug 23, 2023
1 parent 44a6b8b commit 7eb57eb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,7 @@ void sendResponse(final Version nodeVersion, final Set<String> features, final T
Version version = Version.min(this.version, nodeVersion);
OutboundMessage.Response message = new OutboundMessage.Response(threadPool.getThreadContext(), features, response, version,
requestId, isHandshake, compress);
ActionListener<Void> listener = ActionListener.wrap(() -> {
try {
messageListener.onResponseSent(requestId, action, response);
} finally {
response.decRef();
}
});
ActionListener<Void> listener = ActionListener.wrap(() -> messageListener.onResponseSent(requestId, action, response));
sendMessage(channel, message, listener);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public T read(StreamInput in) throws IOException {
@Override
public void handleResponse(T response) {
try {
response.incRef();
channel.sendResponse(response);
} catch (IOException e) {
throw new UncheckedIOException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,6 @@ public void afterTest() throws Exception {
clusterGroup.leaderCluster.wipe(Collections.emptySet());
clusterGroup.followerCluster.wipe(Collections.emptySet());
}

clusterGroup.leaderCluster.assertAfterTest();
clusterGroup.followerCluster.assertAfterTest();
}

private NodeConfigurationSource createNodeConfigurationSource(final String leaderSeedAddress, final boolean leaderCluster) {
Expand Down

0 comments on commit 7eb57eb

Please sign in to comment.