dotnet/orleans · error · InvalidOperationException

Azure Table journal row "{entity.RowKey}" property "{propert

Error message

Azure Table journal row "{entity.RowKey}" property "{propertyName}" is empty.

What it means

A DataNN chunk property exists on a journal row but contains an empty byte array. The writer loop (AzureTableJournalStorage.cs:868) only assigns a chunk while remaining data is non-empty, so an empty chunk should never be persisted. Its presence signals a corrupted or externally edited row.

Source

Thrown at src/Azure/Orleans.Journaling.AzureStorage/AzureTableJournalStorage.cs:925

            }

            if (foundGap)
            {
                throw new InvalidOperationException(
                    $"Azure Table journal row \"{entity.RowKey}\" contains a non-contiguous binary property \"{propertyName}\".");
            }

            ReadOnlyMemory<byte> chunk = value switch
            {
                byte[] bytes => bytes,
                BinaryData binaryData => binaryData.ToMemory(),
                _ => throw new InvalidOperationException(
                    $"Azure Table journal row \"{entity.RowKey}\" property \"{propertyName}\" is not a binary value."),
            };

            if (chunk.IsEmpty)
            {
                throw new InvalidOperationException(
                    $"Azure Table journal row \"{entity.RowKey}\" property \"{propertyName}\" is empty.");
            }

            foundChunk = true;
            buffer.Write(chunk.Span);
            length += chunk.Length;
            consumer.Read(new JournalBufferReader(buffer.Reader, isCompleted: false), metadata);
        }

        if (!foundChunk)
        {
            throw new InvalidOperationException($"Azure Table journal row \"{entity.RowKey}\" does not contain journal data.");
        }

        return length;
    }

    private TableEntity CreateHeaderCountsPatch(HeaderProviderState providerState)

View on GitHub (pinned to fca799fa70)

Solutions

  1. Delete the malformed row (identified by RowKey in the message) and trigger a journal Replace to regenerate it.
  2. Prevent any non-provider code from mutating DataNN properties.
  3. If importing data, validate that every emitted chunk has length > 0 before writing.
Defensive patterns

Strategy: try-catch

Try / catch

try { await journalStorage.ReadAsync(...); }
catch (InvalidOperationException ex) when (ex.Message.Contains("is empty"))
{
    // Delete the offending row and Replace.
}

Prevention

When it happens

Trigger: ReadChunks reads a DataNN property that deserializes to a zero-length byte[]/BinaryData and hits the chunk.IsEmpty guard at AzureTableJournalStorage.cs:923.

Common situations: An external editor cleared a property's bytes without deleting the key; a buggy custom migration wrote empty buffers; partial write under a non-transactional path left a placeholder empty value.

Related errors


AI-assisted analysis of dotnet/orleans@fca799fa70 (2026-08-13). Data as JSON: /api/errors/433122f5e07bc21f. Report an issue: GitHub.