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.
This commit is contained in:
Christian Kamm 2019-04-16 12:18:50 +02:00 committed by Kevin Ottens
parent a4f357ee4b
commit 21cb93e3ce
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -854,8 +854,6 @@ void SyncEngine::slotPropagationFinished(bool success)
void SyncEngine::finalize(bool success)
{
_journal->close();
qCInfo(lcEngine) << "Sync run took " << _stopWatch.addLapTime(QLatin1String("Sync Finished")) << "ms";
_stopWatch.stop();