opendal icon indicating copy to clipboard operation
opendal copied to clipboard

feat: bacth operation should be retried if some of them are failed

Open Xuanwo opened this issue 1 year ago • 2 comments

https://github.com/datafuselabs/opendal/blob/0eff4b7ea52147b40b0406141516fddb09e9d0f5/src/layers/retry.rs#L287-L300

We only retried batch request it self and didn't retry if some of them are failed. Maybe we should also retry them.

Xuanwo avatar Mar 09 '23 10:03 Xuanwo

Add a parameter to indicate whether internal requests are required to retry or not? After all, there are some batches that must succeed completely.

Their idempotency may need to be determined by the application itself?

suyanhanx avatar Mar 09 '23 12:03 suyanhanx

At the moment, we only have the capability to delete in batches. Therefore, I believe it would be acceptable to attempt the process again.

Xuanwo avatar Mar 09 '23 12:03 Xuanwo

I could attempt to implement this, but what should the retry strategy be?

Here's a suggested strategy: After executing a batch operation, if some of the operations fail, we would retry the failed operations as a batch. Continue retrying until the maximum number of retries is reached.

nasen23 avatar Mar 31 '23 06:03 nasen23

Retry the whole batch is good enough.

Xuanwo avatar Mar 31 '23 06:03 Xuanwo

Retry the while batch is good enough.

Did you mean 'whole'?

suyanhanx avatar Mar 31 '23 06:03 suyanhanx

Did you mean 'whole'?

Aha, yes. typo fixed.

Xuanwo avatar Mar 31 '23 06:03 Xuanwo

Retry the whole batch is good enough.

That's a lot easier to implement 😁. Please assign this to me.

nasen23 avatar Mar 31 '23 06:03 nasen23

That's a lot easier to implement . Please assign this to me.

Excellent! I have assigned this task to you. Enjoy!

Xuanwo avatar Mar 31 '23 06:03 Xuanwo