Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-19-2015, 12:38 AM   #16
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
UUID's are used to match books between library and device.

@chaley: If you are worried about the non-atomic part, you can change the code to generate a new uuid and only set the old uuid for the moved record after deletion of the exisiting record completes.
kovidgoyal is offline   Reply With Quote
Old 05-19-2015, 02:32 AM   #17
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,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
@chaley: If you are worried about the non-atomic part, you can change the code to generate a new uuid and only set the old uuid for the moved record after deletion of the exisiting record completes.
I am not worried enough about it to get into that level of change. Book matching (and content server fetching by UUID) will work acceptably as long as the UUID is unique within a library. If the same UUID exists in two libraries then it is possible to have books on the device get new metadata on connect, but this is already made possible by title/author matching.

One possible problem: as far as I can tell nothing checks that the UUID is in fact unique in a given library. There isn't a constraint on the table and set_uuid seems not to check. I think that the only way this "hole" could be exploited is via DB recovery, which unconditionally sets the UUID to the one in the metadata.inf. Perhaps recovery should check, and if the UUID is already there create a new one. I will look at it.
chaley is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre: Read Filename into Custom Column juston Library Management 3 07-25-2019 12:34 AM
Can custom book data be displayed in a custom column? kiwidude Development 9 03-02-2011 05:35 AM
Custom column for book added gandor62 Library Management 1 03-01-2011 06:58 AM
Help needed with custom column in Calibre PapaJohn Library Management 1 02-26-2011 02:41 AM


All times are GMT -4. The time now is 12:15 PM.


MobileRead.com is a privately owned, operated and funded community.