efcore.pg icon indicating copy to clipboard operation
efcore.pg copied to clipboard

Add new overload for `EnableRetryOnFailure` that allows to pass in `maxRetryCount` and `maxRetryDelay`.

Open joseangelyanez opened this issue 5 months ago • 1 comments

None of the four available overloads allow to pass just the max retry count (int) and max delay (TimeSpan). The closest fit to this, is an overload that accepts (int, TimeSpan, ICollection<string>?) where the last parameter is errorCodesToAdd.

Since the purpose of the parameter errorCodesToAdd is unclear and the use of the backing field seems to be a work in progress per the TODO comment at the bottom of NpgsqlRetryingExecutionStrategy.cs, there should be an overload that ignores the existence of said field.

https://github.com/npgsql/efcore.pg/blob/e31994185bee5ff05d06676c872911eeb11f8ae0/src/EFCore.PG/Infrastructure/NpgsqlDbContextOptionsBuilder.cs#L201

joseangelyanez avatar Sep 06 '24 14:09 joseangelyanez