Don't touch database files unless Zotero tab is opened

Hi

Is it possible not to write anything to Zotero folder unless any Zotero content is modified (or at least unless Zotero tab is opened)?

This may help avoid some conflicted copies: If a database is shared between multiple devices through, say, Dropbox (not recommended, but a popular "solution"), forgetting to close Firefox on one of them, before opening on the other, causes Zotero to dump conflicted copies followed by their upload to Dropbox. Currently this happens because sqlite files are updated every time Firefox is started or exited, even if Zotero is never used throughout the whole FF session.

Cheers,
Artem
  • edited April 20, 2016
    Opening the database and closing it does not come free and that is what would be needed. And the builtin background syncing is really useful.

    There seems to be no other driver for this except to use a configuration that is actively discouraged and it doesn't even solve all of the issues with that problematic configuration.
  • Thanks for the reply. Sure, it doesn't solve anything in the configuration.

    Just out of technical curiosity, why isn't opening the database deferred to the moment when it's actually going to be used?

    Is it for the situation when one might save something to the library without preliminary selecting the collection? But even in this case, the opening could be done on the event.
  • Lots of reasons.

    Opening the database takes time and there is some stuff that needs to be cached when the database is first opened for improved responsiveness. The database also needs to be written to immediately when you click on the "save to Zotero" icon. And, as I said: letting the database handle syncing in the background also greatly improves the user experience. I believe there are also third-party add-ons that rely on the data availability at times when the pane is not open.

    But, fundamentally: I can't think of any change that should be made to lower the risk of having other programs tamper with the sqlite file, because any workflow that uses this will always be risky and discouraged.
  • Thanks a lot for the explanation. Now makes more sense to me.
  • (it might be popular but it's not a solution -- it's a shortcut route to getting unrecoverable database corruption. If you get sync conflicts on the database transaction log, $DEITY_OF_CHOICE help you)

    If you're really keen on sharing through dropbox, set up your profile so your attachments are dropbox-synced, and sync only reference data through Zotero (free). This is safe, and any sync conflicts you get on the attachments are easily recoverable.

    Not as easy as just giving a few dollars to Zotero though...
Sign In or Register to comment.