# Understanding operations\_behind in transform stats

**URL:** <https://discuss.elastic.co/t/understanding-operations-behind-in-transform-stats/363281>\
**Category:** Elasticsearch\
**Tags:** transforms\
**Created:** [July 17, 2024, 12:31pm UTC](https://discuss.elastic.co/t/understanding-operations-behind-in-transform-stats/363281 "2024-07-17T12:31:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gueri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gueri/32/103243_2.png) [@gueri](https://discuss.elastic.co/u/gueri)\
**Post date:** [July 17, 2024, 12:31pm UTC](https://discuss.elastic.co/t/understanding-operations-behind-in-transform-stats/363281/1 "2024-07-17T12:31:42Z")

</div>

Hello,

I have a question about the metric operations\_behind when I call the transform stats API.

The elastic doc says the following about operations\_behind :

> The number of operations that have occurred on the source index but have not been applied to the destination index yet. A high number can indicate that the transform is failing to keep up.

Ok but what is an operation here ? Is it a "write" or "delete" for a document ?

I am using transform job of type "Latest". So if a log with the same key is ingested, the transform job will do an update on my output index. This update will be an insert of the new document and a delete of the old one. So what is the impact for operations\_behind here ?

Regards, Eric

---

<div class="post-metadata">

**Author:** ![Patrick\_Whelan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patrick_whelan/32/135049_2.png) [@Patrick\_Whelan](https://discuss.elastic.co/u/Patrick_Whelan)\
**Post date:** [July 30, 2024, 2:38pm UTC](https://discuss.elastic.co/t/understanding-operations-behind-in-transform-stats/363281/2 "2024-07-30T14:38:34Z")

</div>

> Ok but what is an operation here ? Is it a "write" or "delete" for a document ?

An operation is any call to add, update, or delete a document within the source index.

> I am using transform job of type "Latest". So if a log with the same key is ingested, the transform job will do an update on my output index. This update will be an insert of the new document and a delete of the old one. So what is the impact for operations\_behind here ?

Before the transform runs the next checkpoint, the ingested log will count as 1 operation\_behind (the update of the log with the same key).

When the transform runs the next checkpoint, it will search for the changes and add a new document to the destination index with the results.

Operations should have a timestamp that occurs _after_ the last checkpoint timestamp, otherwise changes may be missed, but the operations\_behind will still be reset to 0: [Transform limitations | Elasticsearch Guide [8.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/transform-limitations.html#transform-consistency-limitations)

---

<div class="post-metadata">

**Author:** ![gueri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gueri/32/103243_2.png) [@gueri](https://discuss.elastic.co/u/gueri)\
**Post date:** [August 6, 2024, 2:10pm UTC](https://discuss.elastic.co/t/understanding-operations-behind-in-transform-stats/363281/3 "2024-08-06T14:10:55Z")

</div>

Thank you for your reply Patrick.
