wgtmac commented on code in PR #633:
URL: https://github.com/apache/iceberg-cpp/pull/633#discussion_r3193253304
##########
src/iceberg/util/retry_util.h:
##########
@@ -121,89 +162,34 @@ class ICEBERG_EXPORT RetryRunner {
}
private:
+ enum class RetryPolicyMode {
+ kUnset,
+ kOnlyRetryOn,
+ kStopRetryOn,
+ };
+
using Clock = std::chrono::steady_clock;
using Duration = std::chrono::milliseconds;
using TimePoint = Clock::time_point;
- std::optional<TimePoint> ComputeDeadline() const {
- if (config_.total_timeout_ms <= 0) {
- return std::nullopt;
- }
- return Clock::now() + Duration(config_.total_timeout_ms);
- }
-
- bool HasTimedOut(const std::optional<TimePoint>& deadline) const {
- return deadline.has_value() && Clock::now() >= *deadline;
- }
+ Status ValidateConfig() const;
Review Comment:
Added a declaration comment summarizing that `ValidateConfig` checks retry
counts, timing bounds, and the selected retry policy.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]