ANNOUNCE: xsdb -- the eXtremely Simple Database goes alpha

Aaron Watters aaron at
Mon Jan 5 19:26:20 CET 2004

lipp at (Wolfgang Lipp) wrote in message news:<c0f3952d.0312290737.685678d6 at>...
> hi,
> ....when i create 
> a database, populate it, commit, and then re-open it, i get a nasty
> xsdb.xsdbExceptions.RollBackError....

Thank you very much for finding this problem!

Double apologies: Sorry that I made this bug and sorry that I didn't
respond to your message earlier.  I decided take a different approach
than the one you suggested that fixes the problem systematically (and
required a lot of changes and testing).  

Basically I hadn't considered
the possibility that a program might open two direct connections 
to a database within the same minute (because my machine is so slow :( ).
If you do make very fast connections I added the ability to clear out
all the timestamp information using a special keyword argument to the
connection initializer.  Here is the test case (

"test connecting and then reconnecting to a database quickly"

def test(filename="data/fastconnect.dat"):
    import time
    now = time.time()
    from xsdb.KISSBaseHierarchy import xsdb
    print "testing fast reconnection"
    connection = xsdb(filename, startup=1)
    t = connection.transaction()
    t.add("object1", "this is the object")
    t = connection.transaction()
    t.add("object2", "this is the other object")
    connection = None
    # must clear the connection for fast reconnect!
    connection = xsdb(filename, startup=0, clear=1)
    print "fast reconnect completed in ", time.time()-now

if __name__=="__main__":

If you omit the "clear=1" above you get the exception you reported.

I just uploaded a new file release which includes this and a number
of other bugfixes, enhancements, doc changes, etcetera.  Get it at:

  -- Aaron Watters

You can't talk to a man
When he don't wanna understand  -- Carole King

More information about the Python-list mailing list