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-http: Http methodbuilder does not allow setting sendInterrupts flag to backup request filter #962

Open DieBauer opened 10 months ago

DieBauer commented 10 months ago

The http.Methodbuilder does not allow setting the flag sendInterrupts in the BackupRequestFilter. This means that a backup request that has won, can still have a 'loser' request being requeued/retried, because the loser is not aware of an already won backup.

Describe the solution you'd like I want to be able to pass the flag sendInterrupt to the http.Methodbuilder.idempotent(..) method, which then configures the BackupRequestFilter on the underlying client.Methodbuilder. Currently it's hardcoded to false.

Describe alternatives you've considered Disabling backup requests is an option to not have this issue, however backup requests do add value in my case. Another workaround is to use Java (everything is Scala package private, and java doesn't know about that concept so it's public accessible) and reflection to create such a configured client.Methodbuilder.