mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
SyncEngine: Don't close db when done #7141
The db-close operation is likely a leftover from when the SyncEngine
owned its own db connection and serves no purpose anymore.
Closing the db causes the removal of the temporary wal and shm files.
These files are recreated when the db is opened again, which happens
almost immediately.
This is a problem for winvfs because the delete-recreate step wipes the
exclusion state on these files just after the sync is done. That meant
that the db temporaries permanently had a "needs sync" icon marker shown
in the explorer.
Avoiding reopening the db also reduces the number of log messages per
sync.
(cherry picked from commit 2a900901d3)
Cherry picked as it seems likely to decrease the severety of #6877: if
the database isn't closed and reopened as frequently users are less
likely to run into crashes when the sqlite connection switches to wal
journaling mode.
This commit is contained in:
parent
dc2a37e813
commit
d7d55865fb
@ -1216,7 +1216,6 @@ void SyncEngine::finalize(bool success)
|
||||
_thread.wait();
|
||||
|
||||
_csync_ctx->reinitialize();
|
||||
_journal->close();
|
||||
|
||||
qCInfo(lcEngine) << "CSync run took " << _stopWatch.addLapTime(QLatin1String("Sync Finished")) << "ms";
|
||||
_stopWatch.stop();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user