Skip to content

Commit

Permalink
Do not ignore task cancelled exceptions from sharepoint sdk (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulimo authored Oct 29, 2024
1 parent da93dc6 commit e5c0bcf
Showing 1 changed file with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,29 @@ private async Task FetchDelta(IngressOutput<StreamEventBatch> output, object? st

Logger.BeforeCheckpointInDelta(StreamName, Name);
await output.EnterCheckpointLock();
Logger.FetchingDelta(StreamName, Name);
if (await HandleDataRows(iterator, output))
try
{
_state.WatermarkVersion++;
await output.SendWatermark(new Base.Watermark(readRelation.NamedTable.DotSeperated, _state.WatermarkVersion));

ScheduleCheckpoint(TimeSpan.FromMilliseconds(1));
Logger.FetchingDelta(StreamName, Name);
if (await HandleDataRows(iterator, output))
{
_state.WatermarkVersion++;
await output.SendWatermark(new Base.Watermark(readRelation.NamedTable.DotSeperated, _state.WatermarkVersion));

ScheduleCheckpoint(TimeSpan.FromMilliseconds(1));
}
}
catch(Exception e)
{
Logger.LogError(e, "Error fetching delta");
if (e is TaskCanceledException || e is OperationCanceledException)
{
throw new InvalidOperationException("Error fetching delta, task was cancelled.", e);
}
}
finally
{
output.ExitCheckpointLock();
}
output.ExitCheckpointLock();
}

protected override Task<IReadOnlySet<string>> GetWatermarkNames()
Expand Down

1 comment on commit e5c0bcf

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: e5c0bcf Previous: 7db1083 Ratio
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.InnerJoin 622603480 ns (± 14189768.827245448) 588638700 ns (± 9231369.002121696) 1.06
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.LeftJoin 651303266.6666666 ns (± 13795433.633271554) 632393477.7777778 ns (± 23156158.76418074) 1.03
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.ProjectionAndNormalization 174332160 ns (± 8780567.545969527) 171268600 ns (± 6644227.006958748) 1.02
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.SumAggregation 195826240 ns (± 4175423.136628058) 190822830 ns (± 6415026.852121856) 1.03
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.ListAggWithMapAggregation 2417430830 ns (± 169841183.44471794) 2656394200 ns (± 136074715.58524996) 0.91

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.