Skip to content

Commit

Permalink
change sharepoint source to retry on task cancelled (#662)
Browse files Browse the repository at this point in the history
This stops many crashes of the stream if only reading delta from sharepoint is cancelled.
  • Loading branch information
Ulimo authored Jan 16, 2025
1 parent 3ed3279 commit 044b15f
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,16 @@ private async Task FetchDelta(IngressOutput<StreamEventBatch> output, object? st
}
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);
Logger.LogWarning(e, "Error fetching delta, task was cancelled. Waiting 120 seconds before retrying.");
await Task.Delay(TimeSpan.FromSeconds(120));
}
else
{
Logger.LogError(e, "Error fetching delta");
throw;
}
throw;
}
finally
{
Expand Down

1 comment on commit 044b15f

@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: 044b15f Previous: 4ae8b85 Ratio
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.InnerJoin 539441600 ns (± 6741672.458856185) 592945200 ns (± 35581532.03160469) 0.91
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.LeftJoin 650477750 ns (± 29865233.682782765) 658813590 ns (± 45349397.746520415) 0.99
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.ProjectionAndNormalization 199478330 ns (± 8837912.370111948) 201853112.5 ns (± 5564610.621581839) 0.99
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.SumAggregation 207800800 ns (± 16244455.194858884) 228276677.7777778 ns (± 6383403.230796598) 0.91
FlowtideDotNet.Benchmarks.Stream.StreamBenchmark.ListAggWithMapAggregation 2268833133.3333335 ns (± 87492031.68671991) 2311069716.6666665 ns (± 65590138.42863499) 0.98

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

Please sign in to comment.