Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Allow Retries for Write Operations #4

Open
joshmgross opened this issue Jan 10, 2020 · 2 comments
Open

Allow Retries for Write Operations #4

joshmgross opened this issue Jan 10, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@joshmgross
Copy link
Member

The allowRetries option currently only applies OPTIONS, GET, DELETE and HEAD (see RetryableHttpVerbs since those operations are idempotent by default. This is a good default and avoids any unintended side effects.

There should be an option for the client to specify allowing retries for specific write operations (PUT and POST) if the client knows they are idempotent.

@joshmgross joshmgross added the enhancement New feature or request label Jan 10, 2020
@bryanmacfarlane
Copy link
Member

@joshmgross - since this is so specific to the caller, scenario, and potentially a dangerous thing to do, I think it's best for the consumer to do the retries. Either that or the option is allow unsafeWriteRetries? (sort of how a compiler makes unsafe optional stuff clear). Thoughts?

@joshmgross
Copy link
Member Author

I think an unsafeWriteRetries option would work, as it clarifies that it's potentially dangerous.
Making the consumer implement their own retries is fine, but ends up just duplicating code that's already contained in this package and could potentially introduce issues if not implemented correctly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants