The current region failure path has an extra dispatch stage between buffering failed regions and handling them.
Today the flow is:
- append failed regions into errCache
- dispatch cached items into errCh
- read errCh and run failure handling / retry logic
This extra stage adds one more channel hop and one more goroutine to the recovery path, even though the final retry and reschedule logic stays the same.
We can simplify this by letting the failure handler consume batches directly from errCache, instead of forwarding them through errCh first.
The current region failure path has an extra dispatch stage between buffering failed regions and handling them.
Today the flow is:
This extra stage adds one more channel hop and one more goroutine to the recovery path, even though the final retry and reschedule logic stays the same.
We can simplify this by letting the failure handler consume batches directly from errCache, instead of forwarding them through errCh first.