{"record":{"id":"8ad7eee553d5d14a","repo":"dotnet/orleans","slug":"the-table-version-row-does-not-contain-a-membershi","errorCode":null,"errorMessage":"The table version row does not contain a membership version.","messagePattern":"The table version row does not contain a membership version\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"critical","filePath":"src/Azure/Orleans.Clustering.AzureStorage/AzureBasedMembershipTable.cs","lineNumber":177,"sourceCode":"                    entry,\n                    tableManager.TableName);\n                throw;\n            }\n        }\n\n        private MembershipTableData Convert(List<(SiloInstanceTableEntry Entity, string ETag)> entries)\n        {\n            try\n            {\n                var memEntries = new List<Tuple<MembershipEntry, string>>(Math.Max(0, entries.Count - 1));\n                TableVersion? tableVersion = null;\n                foreach (var tuple in entries)\n                {\n                    var tableEntry = tuple.Entity;\n                    if (tableEntry.RowKey.Equals(SiloInstanceTableEntry.TABLE_VERSION_ROW))\n                    {\n                        var membershipVersion = tableEntry.MembershipVersion\n                            ?? throw new InvalidOperationException(\"The table version row does not contain a membership version.\");\n                        tableVersion = new TableVersion(\n                            int.Parse(membershipVersion, CultureInfo.InvariantCulture),\n                            tuple.ETag);\n                    }\n                    else if (SiloInstanceTableEntry.IsVersionRow(tableEntry.RowKey))\n                    {\n                        continue;\n                    }\n                    else\n                    {\n                        try\n                        {\n\n                            MembershipEntry membershipEntry = Parse(tableEntry);\n                            memEntries.Add(new Tuple<MembershipEntry, string>(membershipEntry, tuple.ETag));\n                        }\n                        catch (Exception exc)\n                        {","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/dotnet/orleans/blob/fca799fa70ecb6ad975224271703ca43221f58de/src/Azure/Orleans.Clustering.AzureStorage/AzureBasedMembershipTable.cs#L159-L195","documentation":"Thrown by AzureBasedMembershipTable.Convert while parsing the table version row: the row whose RowKey equals TABLE_VERSION_ROW had a null MembershipVersion. Orleans uses this numeric version for optimistic concurrency on membership updates; a null means the row is corrupt or was written by an incompatible version. InvalidOperationException surfaces during a membership table read.","triggerScenarios":"Reading the membership table (ReadAll/CleanupDefunct/Merge) when the version row exists in Azure Table Storage but its MembershipVersion property is empty/null. The exception is wrapped by the outer catch and re-logged via LogErrorParsingMembershipTableData.","commonSituations":"Corrupted membership table row (manual edits, partial writes, storage emulator bugs); rolling upgrade where a newer Orleans writes a schema the older code cannot read; a version row created by an external tool missing the MembershipVersion field; Azure table entity property dropped by a migration.","solutions":["Inspect the TABLE_VERSION_ROW entity in Azure Table Storage and restore a numeric MembershipVersion value.","If the cluster is fresh and the table is corrupt, delete the partition and let Orleans reinitialize membership (data loss for membership only).","Ensure all silos run a compatible Orleans version that writes MembershipVersion on the version row.","Avoid editing membership table entities by hand; use the Orleans management APIs."],"exampleFix":"// remediation (Azure Storage Explorer / az CLI)\n// Locate the entity: PartitionKey=<deploymentId>, RowKey='Version'\n// Set MembershipVersion to the last known version (e.g. '0' or the max SiloMembershipVersion)\n\n// after the row is repaired, restart a silo to trigger a fresh membership read","handlingStrategy":"try-catch","validationCode":"// pre-check before acting on membership data is not practical; validate on read:\nvar version = versionRow.MembershipVersion;\nif (string.IsNullOrWhiteSpace(version))\n    throw new InvalidOperationException(\"Version row missing MembershipVersion; repair in Azure Table.\");","typeGuard":null,"tryCatchPattern":"try { var data = await membershipTable.ReadMembershipTableAsync(); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"table version row does not contain a membership version\"))\n{ /* repair the version row, then retry */ }","preventionTips":["Run a consistent Orleans version across the cluster.","Never hand-edit membership table entities.","Back up the membership table before upgrades.","Monitor membership-table read failures in logs."],"tags":["csharp","dotnet","orleans","azure-storage","membership","data-corruption"],"backgroundTag":null,"analyzedSha":"fca799fa70ecb6ad975224271703ca43221f58de","analyzedAt":"2026-08-13T19:55:57.938Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}