@@ -33,7 +33,7 @@ internal sealed class CloudFetchConfiguration
3333 internal const int DefaultPrefetchCount = 2 ;
3434 internal const int DefaultMemoryBufferSizeMB = 200 ;
3535 internal const int DefaultTimeoutMinutes = 5 ;
36- internal const int DefaultMaxRetries = 0 ; // 0 = no limit (use timeout only)
36+ internal const int DefaultMaxRetries = - 1 ; // -1 = not set (use timeout only)
3737 internal const int DefaultRetryTimeoutSeconds = 300 ; // 5 minutes
3838 internal const int DefaultRetryDelayMs = 500 ;
3939 internal const int DefaultMaxUrlRefreshAttempts = 3 ;
@@ -61,8 +61,8 @@ internal sealed class CloudFetchConfiguration
6161
6262 /// <summary>
6363 /// Maximum retry attempts for failed downloads.
64- /// 0 means no limit (use timeout only). When set, the retry loop exits
65- /// if either this count or the timeout is reached.
64+ /// -1 means not set (use timeout only). When set to a non-negative value,
65+ /// the retry loop exits if either this count or the timeout is reached.
6666 /// </summary>
6767 public int MaxRetries { get ; set ; } = DefaultMaxRetries ;
6868
@@ -133,7 +133,7 @@ public static CloudFetchConfiguration FromProperties(
133133 PrefetchCount = PropertyHelper . GetPositiveIntPropertyWithValidation ( properties , DatabricksParameters . CloudFetchPrefetchCount , DefaultPrefetchCount ) ,
134134 MemoryBufferSizeMB = PropertyHelper . GetPositiveIntPropertyWithValidation ( properties , DatabricksParameters . CloudFetchMemoryBufferSize , DefaultMemoryBufferSizeMB ) ,
135135 TimeoutMinutes = PropertyHelper . GetPositiveIntPropertyWithValidation ( properties , DatabricksParameters . CloudFetchTimeoutMinutes , DefaultTimeoutMinutes ) ,
136- MaxRetries = properties . TryGetValue ( DatabricksParameters . CloudFetchMaxRetries , out string ? maxRetriesStr ) && int . TryParse ( maxRetriesStr , out int maxRetries ) && maxRetries > 0 ? maxRetries : DefaultMaxRetries ,
136+ MaxRetries = properties . TryGetValue ( DatabricksParameters . CloudFetchMaxRetries , out string ? maxRetriesStr ) && int . TryParse ( maxRetriesStr , out int maxRetries ) && maxRetries >= 0 ? maxRetries : DefaultMaxRetries ,
137137 RetryTimeoutSeconds = PropertyHelper . GetPositiveIntPropertyWithValidation ( properties , DatabricksParameters . CloudFetchRetryTimeoutSeconds , DefaultRetryTimeoutSeconds ) ,
138138 RetryDelayMs = PropertyHelper . GetPositiveIntPropertyWithValidation ( properties , DatabricksParameters . CloudFetchRetryDelayMs , DefaultRetryDelayMs ) ,
139139 MaxUrlRefreshAttempts = PropertyHelper . GetPositiveIntPropertyWithValidation ( properties , DatabricksParameters . CloudFetchMaxUrlRefreshAttempts , DefaultMaxUrlRefreshAttempts ) ,
0 commit comments