ZODB list,

I have a bookstore that uses the ZODB as its storage.  It uses qooxdoo as
the client and CherryPy for the server.  The server has a 'saveBookById'
routine that works 'most' of the time.  However, sometimes the
transaction.commit() does NOT commit the changes and when I restart my
server the changes are lost.  

My save routine writes a message to a log file each time a book is saved and
the log file ALWAYS shows that the book is saved successfully, even when it
is not.  Following is the relevant code.  I am sure the keys (bookNumber and
storeNumber ) are correct for each call.

Please give me some clues and a place to start looking.  Tell me what
information you need to help.  The ZODB is really nice, but it is also very


      ... record, bookNumber and storeNumber are defined previously. and
db.dbRoot['books'] is an IOBTree
     ...  record is the book record, bookNumber and storeNumber are both
     ... record is a regular python dictionary
    ... the except clause below is never triggered

        bookBase = db.dbRoot['books'][storeNumber]
            bookBase[bookNumber] = record 
            db.dbRoot['books'][storeNumber] = bookBase   
            log("saveNewBook " + str(bookNumber) + "\t" + str(record))          
            log("ADD NEW BOOK SUCCESSFULL" + str(bookNumber))
            return  json.write( { "status" :  "success" , 'book-id' : bookId
, 'title': title,  'store-number': storeNumber,  'book-number': bookNumber, 
'record': record} )            
            log("ERROR in saveNewBook " + str(bookNumber) + "\t" +
            return  json.write( { "status" :  "failure" , 'msg' : "Book
could not be added."} )    

View this message in context: 
Sent from the Zope - ZODB-Dev mailing list archive at Nabble.com.

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to