dhiaayachi / temporal

Temporal service
https://docs.temporal.io
MIT License
0 stars 0 forks source link

Use raw history/matching client in history task executor #322

Open dhiaayachi opened 3 months ago

dhiaayachi commented 3 months ago

History task processing framework already has it's own retry policy re. task processing failures. Using retryable history/matching client for talking to remote service when processing tasks are unnecessary and will cause tasks to retry while holding the goroutine.

This issue is most obvious when those client requests are getting rate limited, which is a retryable error and is retried slowly (backoff.ThrottledRetry) by the history/matching retryable client while holding the goroutine.

dhiaayachi commented 2 months ago

Thanks for reporting this issue.

This behavior is related to the retryable client used for communicating with remote services during history or matching task processing.

The history/matching retryable client uses a backoff strategy (specifically, backoff.ThrottledRetry) for retrying rate-limited requests. This strategy is designed to prevent overwhelming the remote service, but it can lead to goroutine holding while waiting for the retry to complete.

Here are some potential solutions:

If you need further assistance, please provide the following information:

Let me know if you have any other questions.