# Filebeat's harvester cleanup method

**URL:** <https://discuss.elastic.co/t/filebeats-harvester-cleanup-method/306872>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 10, 2022, 10:59am UTC](https://discuss.elastic.co/t/filebeats-harvester-cleanup-method/306872 "2022-06-10T10:59:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiongjunkun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xiongjunkun/32/64189_2.png) [@xiongjunkun](https://discuss.elastic.co/u/xiongjunkun)\
**Post date:** [June 10, 2022, 10:59am UTC](https://discuss.elastic.co/t/filebeats-harvester-cleanup-method/306872/1 "2022-06-10T10:59:57Z")

</div>

Ask a question, when Filebeat's harvester is executed, it will call the cleanup method. Why does it need to send an additional state: h.SendStateUpdate()? Is there something wrong with persisting state through events sent?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 8, 2022, 1:00pm UTC](https://discuss.elastic.co/t/filebeats-harvester-cleanup-method/306872/2 "2022-07-08T13:00:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
