You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
common/countdown/exp_duration.gosanityCheck (runtime path, called from NewExpTimeoutDuration and SetParams): checks the same maxExponent and base^maxExponent rules against the maxExponentUpperbound constant, while GetTimeoutDuration saturates the product at math.MaxInt64 with integer arithmetic.
Future edits risk changing one side and missing the other. #2836 extended this pre-existing duplication by adding the duration-range rule on both sides in two idioms; it kept the duplication deliberately, per the minimal-change policy for that fix.
Proposal
Consolidate the rules in common/countdown — e.g. export a validation function covering the maxExponent upper bound, the base^maxExponent bound and the duration * base^maxExponent duration-range bound — and have validateV2ExpTimeoutConfig call it, keeping the params-side fieldPath error formatting.
Notes
Pure maintenance, no runtime defect: both sides currently agree on every accepted configuration.
Activity