dotnet / dotnet/orleans

EventHub Streaming | Checkpointer not updating

Open
#9,547 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
10.9k
Forks
2.1k
Avg merge
14h 42m
Merged PRs (30d)
354

Description

https://github.com/dotnet/orleans/blob/7012f33fd28230aa9d0e6bac3584e7d016563f14/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubAdapterReceiver.cs#L186

```cs
if (!this.checkpointer.CheckpointExists)
{
    this.checkpointer.Update(
        messages[0].Offset.ToString(),
        DateTime.UtcNow);
}

```

I have a question regarding the logic in the `EventHubAdapterReceiver.cs` file, specifically around the checkpointer code:

Question: Why does the checkpointer check if the checkpoint exists before updating it? The checkpointer I have persisted in Azure Storage tables are only update when my silo starts up for the first time. My assumption was that it would update as often as `PersistInterval` timespan :

```cs
configurator.UseAzureTableCheckpointer(builder => builder.Configure(options =>
{
options.TableName = "tablename";
options.TableServiceClient = new Azure.Data.Tables.TableServiceClient("EventHubStorageConnectionString");
options.PersistInterval = TimeSpan.FromSeconds(30);
}));
```

Contributor guide

Open the contributing guide

Research direction

Start with EventHubAdapterReceiver.cs around line 186 and trace the checkpointer implementation used by UseAzureTableCheckpointer, including PersistInterval handling. Verify when CheckpointExists and Update are evaluated, then compare that behavior with the reported Azure Table records; done means the update behavior is explained or corrected to match the intended persistence interval.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
cloud, distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.