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

[QUESTION] Upgrade v4 to v5 Issue #1664

Closed
DanTwomey opened this issue May 1, 2020 · 2 comments
Closed

[QUESTION] Upgrade v4 to v5 Issue #1664

DanTwomey opened this issue May 1, 2020 · 2 comments
Labels

Comments

@DanTwomey
Copy link

After using the latest master to build LiteDB for the issues that were fixed in the last commit we have come across a big problem. (This would also appear to happen with the latest stable NuGet release)

We have an upgrade section to take our app's previous v4 database to v5 by calling:

_upgraded = LiteDB.Engine.LiteEngine.Upgrade(_litedb4Path, _liteDBPassword);

This runs successfully and the application restarts, however from this point forward, access to the database is extremely slow and the main database file does not get updated at all. Only the .log file gets updated.

If a new database is created this problem does not exist, the .log file appears and then disappears and the main database file gets updated. The performance is as expected.

Note: This also happens with the connection string containing upgrade=true and no manual upgrade being performed.

@DanTwomey DanTwomey changed the title [QUESTION] [QUESTION] Upgrade v4 to v5 Issue May 1, 2020
@lbnascimento
Copy link
Collaborator

@DanTwomey Have you tried running Checkpoint manually?

@lbnascimento
Copy link
Collaborator

@DanTwomey I found the issue: the auto-checkpoint was disabled during upgrade and was not re-enabled, which meant that the changes in the log file would only be commited to the datafile when Checkpoint was manually called.

I made a commit that fixes this issue, and a release should be out soon, but in the meantime you can just run db.Pragma("CHECKPOINT", 1000) once for every affected datafile and it should be fixed.

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

No branches or pull requests

2 participants