envoyproxy / envoyproxy/envoy-mobile
stats: enable lifecycle flushing
- Dominant language
- Java
- Stars
- 566
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
We attempted to implement lifecycle flushing initially in https://github.com/lyft/envoy-mobile/pull/717. However, as evidenced by https://github.com/lyft/envoy-mobile/issues/748 we were running into timing issues. Thus, we turned off lifecycle flushing of stats in #749.
This issue tracks making the necessary changes in order to allow lifecycle flushing to be turned on again.
My initial intuition is that making Envoy run without worker threads (which envoy mobile does not use) would go a long way in solving the problem, as the work to flush stats would not be dispatched to worker threads. However it might also be the case that the state flag that informs that a flush is being done is set before the flush event is posted on the event loop, in which case another synchronous flush on the main thread would hit the assertion if flushing is still posted on the main thread's event loop.
Overall some thinking needs to be done :)
Contributor guide
Assessment
This issue has not been assessed yet.