Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[util/finagle-core][fiber-scheduler] don't reject tasks redirected fr…
…om `FuturePool`s **Problem** The fiber scheduler can reject tasks that are redirected from `FuturePool`s. The idea behind that was to avoid having to support unbounded queuing but that's making the adoption of the new scheduler more difficult. **Solution** Introduce a new `tryFork` method that has a behavior similar to the previous `fork` implementation and allows the caller to detect if the task got rejected without having to handle an exception. The `fork` method is changed to never reject requests even if the scheduler is overloaded. Typically, `tryFork` is called from Finagle's default filter chain, which can reject tasks, and `fork` is called from redirected `FuturePool`s. Users can also call those methods directly but we don't have cases of that yet. **Notes** - With this change, it's safer to redirect `FuturePool`s so I changed the default fiber scheduler configuration to set `redirectFuturePools` to `true` - Ideally, we should revisit this in the future so unbounded queuing doesn't need to be supported but that will require a larger effort to adapt applications Differential Revision: https://phabricator.twitter.biz/D760928
- Loading branch information