Skip to content

Commit 52ee777

Browse files
dnhatnalbertzaharovits
authored andcommitted
Fix BWC for compute listener (#110615)
ComputeResponse from old nodes may have a null value instead of an empty list for profiles. Relates #110400 Closes #110591
1 parent b6ea9ff commit 52ee777

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ tests:
9797
- class: "org.elasticsearch.xpack.searchablesnapshots.FrozenSearchableSnapshotsIntegTests"
9898
issue: "https://github.com/elastic/elasticsearch/issues/110408"
9999
method: "testCreateAndRestorePartialSearchableSnapshot"
100-
- class: "org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT"
101-
issue: "https://github.com/elastic/elasticsearch/issues/110591"
102100

103101
# Examples:
104102
#

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)