Skip to content

Conversation

@roji
Copy link
Member

@roji roji commented Dec 8, 2020

Fixes #23630

Description

Three event counters don't get updated when the async API is used (as opposed to the sync one). An additional event counter is incorrectly updated, and so show wrong results.

Customer Impact

Our newly-introduced event counters show incorrect data which does not take into account async calls.

How found

Customer reported an issue on 5.0.0 with one counter, the rest discovered via due diligence.

Test coverage

As far as I can tell, event counters don't currently have test coverage in any of our projects (EF Core, ASP.NET, runtime). Their nature makes it difficult to write reliable, non-flaky tests.

Regression?

No, event counters are new in 5.0.0.

Risk

Very low, add missing counter updates which are already in place and working for the sync versions, and move the location of another counter update. Only affects the new event counters feature.

@roji roji requested a review from a team December 8, 2020 07:58
@roji roji changed the base branch from main to release/5.0 December 8, 2020 07:58
@ajcvickers
Copy link
Contributor

@roji A few questions around the case for patching this:

  • How did you verify the fix?
  • Have you ensured that we don't have similar issues for other event counter? Can we verify that we don't?
  • Given that we don't have test coverage, can we add it? If not, how to we avoid making similar mistakes in the future?

@roji roji force-pushed the SaveChangesEventCounter5.0 branch from ef085de to 318275e Compare December 8, 2020 22:26
@roji roji changed the title Fix missing event source logging (#23605) Fix event counter issues Dec 8, 2020
@roji
Copy link
Member Author

roji commented Dec 8, 2020

@ajcvickers I think the answers are in #23630 - I've gone over all the counters and located other issues.

@roji roji changed the title Fix event counter issues [5.0.2] Fix event counter issues Dec 10, 2020
@ajcvickers
Copy link
Contributor

Superseded by #23826

@ajcvickers ajcvickers closed this Jan 6, 2021
@smitpatel smitpatel deleted the SaveChangesEventCounter5.0 branch January 7, 2021 19:18
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.

Calls to SaveChangesAsync do not update the EntityFrameworkEventSource values

5 participants