# GrainStateWithMetaData&lt;TView&gt;.WriteVector

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.statestorage.grainstatewithmetadata-1/) | [Properties](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.statestorage.grainstatewithmetadata-1/properties/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.EventSourcing/StateStorage/GrainStateWithMetaData.cs)

```csharp
[Orleans.Id(2)]
public string WriteVector
```

Metadata that is used to avoid duplicate appends. Logically, this is a (string-&gt;bit) map, the keys being replica ids But this map is represented compactly as a simple string to reduce serialization/deserialization overhead Bits are read by `Orleans.EventSourcing.StateStorage.GrainStateWithMetaData-1.GetBit(System.String)` and flipped by `Orleans.EventSourcing.StateStorage.GrainStateWithMetaData-1.FlipBit(System.String)`. Bits are toggled when writing, so that the retry logic can avoid appending an entry twice when retrying a failed append.
