Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Support delaying shutdown until the shipper queue is empty #68

Closed
cmacknz opened this issue Jun 24, 2022 · 1 comment
Closed

Support delaying shutdown until the shipper queue is empty #68

cmacknz opened this issue Jun 24, 2022 · 1 comment
Assignees
Labels
estimation:Week Task that represents a week of work. Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Comments

@cmacknz
Copy link
Member

cmacknz commented Jun 24, 2022

To minimize data loss, the shipper should support delaying shutdown and process exit until there are no longer any active Publish RPCs and all events remaining in the queue have been written to the output.

Specifically, when the agent control protocol indicates the shipper's expected state is STOPPING, the shipper should not acknowledge the STOPPING state and exit until the number of events in the queue is zero.

Ideally the agent will stop the shipper after all agent inputs are confirmed to have stopped so that the only in flight data will reside inside the shipper. This likely requires a change to the agent control plane, but the shipper could also infer whether the inputs are stopped based in the amount of RPC activity.

The maximum time to wait before exiting regardless of the number of events in the queue should be added to the shipper configuration file (and possibly the agent policy). When a disk queue is configured, the shipper can exit after all active RPC calls to publish data are terminated. The events in the queue will have been persisted to disk.

@cmacknz
Copy link
Member Author

cmacknz commented Jan 5, 2023

I'm going to close this. The agent does not configure this for the Beats today so for parity with the existing system we don't need it.

@cmacknz cmacknz closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
estimation:Week Task that represents a week of work. Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

No branches or pull requests

3 participants