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
Labels
estimation:Week
Task that represents a week of work.
Team:Elastic-Agent-Data-Plane
Label for the Agent Data Plane team
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.
The text was updated successfully, but these errors were encountered: