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 9a24f16491e..024697d41c4 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 final class OpenPointInTimeRequest extends ActionRequest implements Indic 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); } }