View Single Post
Old 05-05-2013, 10:58 AM   #8
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by offby1 View Post
There's no metadata.db conflict; I assumed that must have been the case, but it turns out no. For what it's worth, the content server _only_ reads the DB, it never (at least, not under my control) writes to the DB.

I have resolved the issue, however; it turns out I'd misunderstood how and when calibre writes to the DB; it writes on exit, not on edit, which meant that my changes had not persisted until I quit Calibre on my editing host.

*facepalm*

Thanks for the feedback.
just for completeness because it might matter someday -- calibre does write to the db on each update. In most cases it opens a database transaction, writes everything it needs to write, then commits the transaction. However, even though the db is up-to-date, calibre is still holding the lock on the db. Depending on the OS and some other things, that lock will prevent other programs from opening and copying the db.

Also, even though the content server does not write to the db, it does open it for update. Python, calibre's implementation language, does not support read-only database access. Because the db is open for write there is a lock, which can block other programs from accessing the db.
chaley is offline   Reply With Quote