Skip to content

Commit 306fe9c

Browse files
committed
chore(util): address retry review comments
1 parent be29bdd commit 306fe9c

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/iceberg/test/retry_util_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ TEST(RetryRunnerTest, OnlyRetryOnTakesPrecedenceOverStopRetryOn) {
210210
.max_wait_ms = 10,
211211
.total_timeout_ms = 5000})
212212
.OnlyRetryOn(ErrorKind::kCommitFailed)
213-
.StopRetryOn({ErrorKind::kCommitFailed})
213+
.StopRetryOn(ErrorKind::kCommitFailed)
214214
.Run(
215215
[&]() -> Result<int> {
216216
++call_count;

src/iceberg/util/retry_util.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,19 @@ class ICEBERG_EXPORT RetryRunner {
163163

164164
private:
165165
enum class RetryPolicyMode {
166+
// No retry policy was selected; invalid when retries are enabled.
166167
kUnset,
168+
// Retry only errors listed in retry_error_kinds_.
167169
kOnlyRetryOn,
170+
// Retry all errors except those listed in retry_error_kinds_.
168171
kStopRetryOn,
169172
};
170173

171174
using Clock = std::chrono::steady_clock;
172175
using Duration = std::chrono::milliseconds;
173176
using TimePoint = Clock::time_point;
174177

178+
/// \brief Validate retry counts, timing bounds, and the selected retry policy.
175179
Status ValidateConfig() const;
176180
std::optional<TimePoint> ComputeDeadline() const;
177181
bool HasTimedOut(const std::optional<TimePoint>& deadline) const;

0 commit comments

Comments
 (0)