# GrainStateWithMetaData&lt;TView&gt; Properties

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

## GlobalVersion {#globalversion-cd64392c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.statestorage.grainstatewithmetadata-1/properties/globalversion-cd64392c/)

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

```csharp
[Orleans.Id(1)]
public int GlobalVersion
```

The length of the log

## State {#state-eeb38d70}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.statestorage.grainstatewithmetadata-1/properties/state-eeb38d70/)

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

```csharp
[Orleans.Id(0)]
public TView State
```

The stored view of the log

## WriteVector {#writevector-dd1a97ed}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.statestorage.grainstatewithmetadata-1/properties/writevector-dd1a97ed/)

[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.
