[ZODB-Dev] snapshot isolation how-to

Adam Groszer adamg@mailbox.hu
Wed Apr 16 10:24:35 EDT 2003


>Meanwhile, you can download the second version that fixes this bug
>and another one.

Applied, checked, working fine.

What about resetting Transaction._startSerial at a finished transaction?

Should I simply put 'self._transaction = None' at the end of
Connection.close
implementing this is just a snap
-- or --
Something like this:

Transaction.py:
    def _setup(self):
        print 'ZODB.Transaction._setup',t
        self._objects=[]
        self._append=self._objects.append
        self._start()

    def _start(self):
        print 'ZODB.Transaction._start',t
        t= time.time()
        self._startSerial= `TimeStamp(*(time.gmtime(t)[:5] + (t % 60,)))`

but I'm not sure when to call _start():
looks like abort() will maybe call it through self._init() but surely not in
a 'main' transaction
in commit() I would
            del objects[:] # clear registered
+		self._start()
            if not subtransaction and self._id is not None:


>  Probably, I must make a comment that the patch was tested only
>  with the ZODB version distributed with Zope 2.6.1.

Yes, you're right. Don't count the feedback as a complaint, it was thought
more as an enhancement proposal.
I'm developing currently a client(GUI)-server app which has nothing to do
with Zope or even with the web, I'm just using ZODB as persistence on the
server side.

regards,

Adam





More information about the ZODB-Dev mailing list