twitter / finagle

A fault tolerant, protocol-agnostic RPC system
https://twitter.github.io/finagle
Apache License 2.0
8.78k stars 1.45k forks source link

finagle-core: Use configured deadline params #937

Closed DieBauer closed 10 months ago

DieBauer commented 1 year ago

Problem

We can set the TimeoutFilter.PropagateDeadlines and TimeoutFilter.PreferDeadlineOverTimeout to configure behavior on the Client. When the MethodBuilder interface is used, the perRequestModule does only look at the Default values of these configurations, preventing custom configuration.

Solution

Pass the TimeoutFilter.PropagateDeadlines and TimeoutFilter.PreferDeadlineOverTimeout as Params to the perRequestModule to instantiate the TimeoutFilter with correct configuration.

Result

The MethodBuilder will pick up configured TimeoutFilter.PropagateDeadlines and TimeoutFilter.PreferDeadlineOverTimeout parameters.

Signed-off-by: Jens Kat jenskat@gmail.com