Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back execution retry for query. #18691

Merged
merged 1 commit into from
Nov 2, 2019
Merged

Add back execution retry for query. #18691

merged 1 commit into from
Nov 2, 2019

Conversation

AndriySvyryd
Copy link
Member

Issue:
We lacked tests for implicit usage of the execution strategy, so when the query pipeline was rewritten the lack of this feature wasn't detected.

Solution:
Add execution retry for query with a buffering data reader.
Move the retry scope for SaveChanges to properly reset the state before retrying.
Add tests for implicit usage of the execution strategy.

Fixes #18628

@AndriySvyryd
Copy link
Member Author

cc @Pilchie

@AndriySvyryd AndriySvyryd force-pushed the Issue18628 branch 4 times, most recently from 31476fe to 92808a3 Compare November 1, 2019 19:08
}

public ReaderColumn[] ProjectionColumns { get; }
Copy link
Contributor

Choose a reason for hiding this comment

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

entry method into visitor with out parameter

if (ProjectionColumns != null)
{
var columnType = valueExpression.Type;
if (!columnType.IsValueType
Copy link
Contributor

Choose a reason for hiding this comment

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

For non value type you wouldn't need casting to object, It should just work

Copy link
Member Author

@AndriySvyryd AndriySvyryd Nov 1, 2019

Choose a reason for hiding this comment

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

I need it to compile to Func<DbDatareader, int[], object>

Move the retry scope for SaveChanges to properly reset the state before retrying.

Fixes #18628
@AndriySvyryd AndriySvyryd merged commit 70c8988 into release/3.1 Nov 2, 2019
@AndriySvyryd AndriySvyryd deleted the Issue18628 branch November 2, 2019 00:13
roji added a commit to roji/efcore.pg that referenced this pull request Feb 3, 2020
Includes test changes done in dotnet/efcore#18691

Tests now run using retrying strategy, hopefully working around the
transient exceptions we're seeing on CI since the migration tests.

Closes npgsql#1244
roji added a commit to npgsql/efcore.pg that referenced this pull request Feb 3, 2020
Includes test changes done in dotnet/efcore#18691

Tests now run using retrying strategy, hopefully working around the
transient exceptions we're seeing on CI since the migration tests.

Closes #1244
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ExecutionStrategy ignored when doing ToList() in EF Core 3.0
3 participants