Thread: Refresh library
View Single Post
Old 06-05-2016, 03:57 PM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Uhm, I assure you if everything is working fine you have no need for a refresh button. Clearly you are not running multiple simultaneous instances.

calibre holds an in-memory copy of the database, and when it is changed, the change is also written to the database file.
Running two copies of calibre simultaneously against the same library database, means that the two copies are writing different transactions against the same database, without knowing anything about the other's state.
THIS WILL INSTANTLY CORRUPT IT! NO IFS ANDS OR BUTS! DO NOT DO IT! REALLY! I MEAN IT!

It's not even a NAS issue -- you can get the same problem if you run calibre twice on the same computer, though calibre enforces a one-instance-at-a-time rule and you will have to get around it by using multiple user logins or cheating with a 1.x version which uses a different locking mechanism or straight-up hacking the code to remove the restriction...
Nevertheless, it is certainly true that a NAS can lead to multiple-simultaneous-instance violations.

Using a NAS* brings with it a raft of other kinda-somewhat-related problems, and I strongly encourage you not to do so. But unlike multiple-simultaneous-instance violation, they aren't automatically fatal. Some people get away with it due to unreliable, non-duplicable magic... at least until their house of cards collapses and releases the magic smoke. (Mixed metaphors? )

In an upcoming calibre v3 release, the Content Server will be expanded with read/write access and calibre will operate on a server/client architecture. At that time, what you want will be possible (and safe).


* -- It doesn't really matter what the implementation or brand is.
eschwartz is offline   Reply With Quote