Conversation
1cdc3af to
a471e18
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a total_timeout configuration of type Option<std::time::Duration> to the Pub/Sub publisher. It extracts the remaining time from the builder's retry policy during BasePublisher initialization and propagates this timeout through the PublisherPartialBuilder, Dispatcher, and ConcurrentBatchActor. Additionally, unit tests are added to verify the default, custom, and attempt-limit-only timeout behaviors. There are no review comments to address, and the changes conform to the repository's guidelines.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6830 +/- ##
========================================
Coverage 97.18% 97.18%
========================================
Files 330 330
Lines 110390 110567 +177
========================================
+ Hits 107282 107457 +175
- Misses 3108 3110 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
d6025e2 to
4899c14
Compare
|
I think we will want to include the whole retry policy, it turns out we want to resolve responses with non-transient errors, so we want the policy to find out which ones are considered non-transient. |
3ee70a8 to
7aafcb9
Compare
NVM we don't need it. just saving total_timeout for now. |
7aafcb9 to
a8d560a
Compare
Forward the configured publish timeout from BasePublisher through PublisherPartialBuilder and Dispatcher to ConcurrentBatchActor. This enables publisher request hedging to clamp hedged attempt timeouts to min(remaining_total_time, 10s).
a8d560a to
5686b2c
Compare
Extract the total timeout duration from the configured retry policy in BasePublisher and forward it through PublisherPartialBuilder and Dispatcher to ConcurrentBatchActor in preparation for publish request hedging. Calculating it this way means we may be off from the actual total_timeout by a small amount (the time between creating the state and querying total_timeout).
This is used by hedging to make sure that the timeout for a hedged request does not exceed the total timeout of the original request.
For #6776