Skip to content

Commit 41c662d

Browse files
authored
Fix BWC for compute listener (#110615) (#110617)
ComputeResponse from old nodes may have a null value instead of an empty list for profiles. Relates #110400 Closes #110591
1 parent d0859d5 commit 41c662d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/ComputeListener.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ ActionListener<Void> acquireAvoid() {
7676
ActionListener<ComputeResponse> acquireCompute() {
7777
return acquireAvoid().map(resp -> {
7878
responseHeaders.collect();
79-
if (resp != null && resp.getProfiles().isEmpty() == false) {
80-
collectedProfiles.addAll(resp.getProfiles());
79+
var profiles = resp.getProfiles();
80+
if (profiles != null && profiles.isEmpty() == false) {
81+
collectedProfiles.addAll(profiles);
8182
}
8283
return null;
8384
});

0 commit comments

Comments
 (0)