From 3d3a1b4bc2c075a051470adc7a3be1bc408285ae Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Fri, 11 Sep 2020 10:06:35 +0200 Subject: [PATCH] Tweak OpenPointInTimeRequest createTask This commit addresses a super minor misalignment with master, applying exactly the same change that was made as part of #62057, which was backported before point in time APIs were backported. --- .../xpack/core/search/action/OpenPointInTimeRequest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/OpenPointInTimeRequest.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/OpenPointInTimeRequest.java index 9a24f16491efe..024697d41c452 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/OpenPointInTimeRequest.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/OpenPointInTimeRequest.java @@ -105,10 +105,13 @@ public String preference() { return preference; } + @Override + public String getDescription() { + return "open point in time: indices [" + String.join(",", indices) + "] keep_alive [" + keepAlive + "]"; + } + @Override public Task createTask(long id, String type, String action, TaskId parentTaskId, Map headers) { - final Supplier description = - () -> "open point in time: indices [" + String.join(",", indices) + "] keep_alive [" + keepAlive + "]"; - return new SearchTask(id, type, action, description, parentTaskId, headers); + return new SearchTask(id, type, action, this::getDescription, parentTaskId, headers); } }