SyncEngine: Don't close db when done #7141
authorChristian Kamm <mail@ckamm.de>
Tue, 16 Apr 2019 10:18:50 +0000 (12:18 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:48 +0000 (10:58 +0100)
commit21cb93e3cee0926854eae066e91cde683fbc0c93
tree4ef20d05f5a9d1ff2fcb580fbc5f98fecdd3a1ac
parenta4f357ee4b20f678347d117a504f5d5b3a662723
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.
src/libsync/syncengine.cpp