{"record":{"id":"b27114a8fc1bf9ab","repo":"dotnet/orleans","slug":"metadataonlyconflictinitialbackoff-must-be-non-neg-b27114","errorCode":null,"errorMessage":"MetadataOnlyConflictInitialBackoff must be non-negative.","messagePattern":"MetadataOnlyConflictInitialBackoff must be non-negative\\.","errorType":"validation","errorClass":"ArgumentOutOfRangeException","httpStatus":null,"severity":"error","filePath":"src/Azure/Orleans.Journaling.AzureStorage/AzureTableJournalStorage.cs","lineNumber":1285,"sourceCode":"            AzureTableJournalStorageOptions.ValidateTableName(Options.TableName);\n            if (Options.CompactionRowCountThreshold <= 0)\n            {\n                throw new ArgumentOutOfRangeException(nameof(options), $\"{nameof(AzureTableJournalStorageOptions.CompactionRowCountThreshold)} must be positive.\");\n            }\n\n            if (Options.CompactionSizeThreshold <= 0)\n            {\n                throw new ArgumentOutOfRangeException(nameof(options), $\"{nameof(AzureTableJournalStorageOptions.CompactionSizeThreshold)} must be positive.\");\n            }\n\n            if (Options.MaxMetadataOnlyConflictRetries < 0)\n            {\n                throw new ArgumentOutOfRangeException(nameof(options), $\"{nameof(AzureTableJournalStorageOptions.MaxMetadataOnlyConflictRetries)} must be non-negative.\");\n            }\n\n            if (Options.MetadataOnlyConflictInitialBackoff < TimeSpan.Zero)\n            {\n                throw new ArgumentOutOfRangeException(nameof(options), $\"{nameof(AzureTableJournalStorageOptions.MetadataOnlyConflictInitialBackoff)} must be non-negative.\");\n            }\n\n            if (Options.MetadataOnlyConflictMaxBackoff < TimeSpan.Zero)\n            {\n                throw new ArgumentOutOfRangeException(nameof(options), $\"{nameof(AzureTableJournalStorageOptions.MetadataOnlyConflictMaxBackoff)} must be non-negative.\");\n            }\n\n            JournalFormatKey = journalFormatKey;\n            TableClientProvider = tableClientProvider;\n            Instruments = instruments;\n        }\n\n        public ILogger<AzureTableJournalStorage> Logger { get; }\n\n        public AzureTableJournalStorageOptions Options { get; }\n\n        public string? JournalFormatKey { get; }\n","sourceCodeStart":1267,"sourceCodeEnd":1303,"githubUrl":"https://github.com/dotnet/orleans/blob/fca799fa70ecb6ad975224271703ca43221f58de/src/Azure/Orleans.Journaling.AzureStorage/AzureTableJournalStorage.cs#L1267-L1303","documentation":"AzureTableJournalStorageOptions.MetadataOnlyConflictInitialBackoff was set to a negative TimeSpan. The constructor (AzureTableJournalStorage.cs:1283) requires it non-negative (TimeSpan.Zero is allowed and means retry immediately). The argument blamed is `options`.","triggerScenarios":"Configuring MetadataOnlyConflictInitialBackoff < TimeSpan.Zero; thrown at AzureTableJournalStorage.cs:1285.","commonSituations":"Config parser produced a negative TimeSpan; a formula subtracted delays and underflowed; confusion between 'no delay' (Zero) and negative.","solutions":["Set MetadataOnlyConflictInitialBackoff to TimeSpan.Zero or a positive value (default 10 ms).","Use TimeSpan.Zero when you want immediate retries.","Validate via IValidateOptions<T> at startup."],"exampleFix":"// before\noptions.MetadataOnlyConflictInitialBackoff = TimeSpan.FromMilliseconds(-5);\n\n// after\noptions.MetadataOnlyConflictInitialBackoff = AzureTableJournalStorageOptions.DEFAULT_METADATA_ONLY_CONFLICT_INITIAL_BACKOFF;","handlingStrategy":"validation","validationCode":"if (options.MetadataOnlyConflictInitialBackoff < TimeSpan.Zero)\n    throw new ArgumentOutOfRangeException(nameof(options.MetadataOnlyConflictInitialBackoff), \"Must be non-negative\");","typeGuard":"static bool IsValidBackoff(TimeSpan v) => v >= TimeSpan.Zero;","tryCatchPattern":null,"preventionTips":["Use TimeSpan.Zero for immediate retries.","Validate TimeSpan config bindings explicitly.","Guard against arithmetic underflow when computing backoffs."],"tags":["configuration","options","validation"],"backgroundTag":null,"analyzedSha":"fca799fa70ecb6ad975224271703ca43221f58de","analyzedAt":"2026-08-13T19:55:57.938Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}