Evaluate flow `auto_close_timeout` lazily
Categories
(Data Platform and Tools :: Glean: SDK, enhancement, P1)
Tracking
(Not tracked)
People
(Reporter: travis_, Assigned: travis_)
References
(Blocks 2 open bugs)
Details
Attachments
(1 external file)
Close a flow instance with reason: timeout once its auto_close_timeout has elapsed. Depends on the lifecycle bug.
Whether the timeout is measured from when the instance opened or from the instance's last tagged event is an open question on the meta, and needs an answer before work starts. The proposal currently specifies time since the instance opened.
There is no timer thread, matching the session inactivity timeout. Check an instance's timeout whenever the SDK is already handling it:
- before adding a
flowsentry for it to an event, - when an entry or exit event for its flow is recorded,
- in
handle_client_active()andhandle_client_inactive(), - at session end, before closing remaining instances with
reason: session_end.
An expired instance is closed with reason: timeout before the event that noticed it is tagged, so that event does not carry it. If the event is in that flow's starts_on, a new instance opens in the same recording.
glean.flow_end is timestamped when the expiry is noticed, not when the timeout elapsed. Document this in the flow_end metric description.
Instances without auto_close_timeout (if the field stays optional) never time out and end only by exit or session end.
Restoring state at startup also checks timeouts. That is covered in the persistence bug.
Comment 1•19 days ago
|
||
(via GitHub webhook, authenticated as shared-secret)
| Assignee | ||
Updated•19 days ago
|
| Assignee | ||
Updated•5 days ago
|
Description
•