Briefly, this error occurs when you try to acknowledge a watch in Elasticsearch while it’s still running. Watches are tasks that run at specified intervals to check for certain conditions. Acknowledging a watch means you’re confirming that you’ve seen its output. To resolve this issue, you can either wait for the watch to finish running before acknowledging it, or you can stop the watch manually before trying to acknowledge it. You could also consider adjusting the schedule of the watch if it’s running too frequently or taking too long to complete.
This guide will help you check for common problems that cause the log ” watch[{}] is running currently; cannot ack until finished ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.
Log Context
Log “watch[{}] is running currently; cannot ack until finished” class name is TransportAckWatchAction.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :
executeAsyncWithOrigin(client; WATCHER_ORIGIN; WatcherStatsAction.INSTANCE; watcherStatsRequest; ActionListener.wrap(response -> { boolean isWatchRunning = response.getNodes().stream() .anyMatch(node -> node.getSnapshots().stream().anyMatch(snapshot -> snapshot.watchId().equals(request.getWatchId()))); if (isWatchRunning) { listener.onFailure(new ElasticsearchStatusException("watch[{}] is running currently; cannot ack until finished"; RestStatus.CONFLICT; request.getWatchId())); } else { GetRequest getRequest = new GetRequest(Watch.INDEX; request.getWatchId()) .preference(Preference.LOCAL.type()).realtime(true);
[ratemypost]