Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finagle-core: Deposit budget once in MethodBuilder #957

Closed
wants to merge 1 commit into from

Conversation

DieBauer
Copy link
Contributor

Problem

The methodbuilder interface applies the same retrybudget for RetryFilter and RequeueFilter in the same stack. Resulting in double deposit of retrybudget.

Solution

Re-use the WithdrawOnlyRetryBudget to prevent depositing successes in the RequeueFilter and only deposit in the RetryFilter. Same solution as the Retries.moduleWithRetryPolicy takes.

Result

Retrybudget only gets deposited once for a request.

Closes #956

@mattdickinson5
Copy link
Contributor

@DieBauer - this code isn't compiling, and when i fix it the MethodBuilderRetryTest test does not pass.

Problem

The methodbuilder interface applies the same retrybudget for RetryFilter and
RequeueFilter in the same stack. Resulting in double deposit of retrybudget.

Solution

Re-use the WithdrawOnlyRetryBudget to prevent depositing successes in the
RequeueFilter and only deposit in the RetryFilter.
Same solution as the `Retries.moduleWithRetryPolicy` takes.

Result

Retrybudget only gets deposited once for a request.
@DieBauer
Copy link
Contributor Author

I've rebased to develop (SNAPSHOTS were shifted). And an assert was indeed wrong. In the last testcase .retry.disabled, you do not expect any 'retries' stat to be present!

Let me know what you think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Methodbuilder retry budget gets double deposit
2 participants