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

RC2 Sqlite provider no longer clears temporary files on exit #26422

Closed
ExtendedSpice opened this issue Oct 21, 2021 · 4 comments
Closed

RC2 Sqlite provider no longer clears temporary files on exit #26422

ExtendedSpice opened this issue Oct 21, 2021 · 4 comments
Assignees
Labels
area-adonet-sqlite closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported regression Servicing-approved type-bug
Milestone

Comments

@ExtendedSpice
Copy link

Since RC2 update scoped sqlite dbcontext no longer deletes *-shm and *-wal files on app exit.
Maybe I am missing some clean up behavior settings but it worked without apparent tweaks in previous versions.

Microsoft.EntityFrameworkCore.Sqlite version 6.0.0-rc.2.21480.5
Target framework: NET 6.0 preview

@ajcvickers
Copy link
Contributor

@bricelam Ping; possible patch issue.

@bricelam
Copy link
Contributor

bricelam commented Nov 3, 2021

As a workaround, you can add this to your application startup:

AppDomain.CurrentDomain.ProcessExit += (sender, e) =>
{
    SqliteConnection.ClearAllPools();
};

bricelam added a commit to bricelam/efcore that referenced this issue Nov 3, 2021
@bricelam bricelam added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Nov 3, 2021
@ghost ghost closed this as completed in 6ae128a Nov 10, 2021
@ajcvickers ajcvickers modified the milestones: 6.0.x, 6.0.1 Nov 16, 2021
@ajcvickers
Copy link
Contributor

FYI for those impacted by this issue: EF Core 6.0.1 is now available from NuGet.

@hippieZhou
Copy link

you can use this way

 if (dbContext.Database.GetDbConnection() is SqliteConnection conn)
{
    SqliteConnection.ClearPool(conn);
}

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-adonet-sqlite closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported regression Servicing-approved type-bug
Projects
None yet
Development

No branches or pull requests

5 participants